From ec494bbdc76c24e846f08dda5706979d56c6270a Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:15:56 +0200 Subject: [PATCH 01/50] :wrench: config(hooks): Explicit config path in commit-msg. This is to workaround https://github.com/conventional-changelog/commitlint/issues/2742. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12477f6e..f79be18d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "build-gh-pages": "npm run build-docs", "ci:build": "npm run build", "ci:test": "npm run lint-config && npm run lint && npm run cover", - "commit-msg": "commitlint --edit", + "commit-msg": "commitlint -g .commitlintrc.cjs --edit", "cover": "NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test", "debug": "NODE_ENV=debug npm run test -- -st --fail-fast", "dev": "npm run lint-config-and-fix && npm run lint-and-fix && npm run cover -- -- -st --fail-fast", From 2eabf53769832bfc9a241c1155e1f6c4260b2912 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:20:15 +0200 Subject: [PATCH 02/50] :wrench: config(xo): Use @babel/eslint-parser. --- package.json | 5 +++++ yarn.lock | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f79be18d..a53f08a3 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "dependencies": {}, "devDependencies": { "@babel/core": "7.16.0", + "@babel/eslint-parser": "7.16.3", "@babel/preset-env": "7.16.4", "@babel/register": "7.16.0", "@commitlint/cli": "15.0.0", @@ -210,6 +211,10 @@ "trailingComma": "all" }, "xo": { + "parser": "@babel/eslint-parser", + "parserOptions": { + "requireConfigFile": false + }, "prettier": true, "plugins": [ "unicorn" diff --git a/yarn.lock b/yarn.lock index a4d19c5c..3bdecc8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -73,6 +73,15 @@ semver "^6.3.0" source-map "^0.5.0" +"@babel/eslint-parser@7.16.3": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz#2a6b1702f3f5aea48e00cea5a5bcc241c437e459" + integrity sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ== + dependencies: + eslint-scope "^5.1.1" + eslint-visitor-keys "^2.1.0" + semver "^6.3.0" + "@babel/eslint-parser@^7.12.16": version "7.15.0" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.15.0.tgz#b54f06e04d0e93aebcba99f89251e3bf0ee39f21" @@ -10094,15 +10103,15 @@ xo@0.47.0: integrity sha512-QHRIpaPSG7tK7PX4K4fqe0V4EH1u2IkM7Pr356u1fKcVsZskw7i9gfEqyBLsnnc4e4Y8gnLtIqasLJsGPqM8sA== dependencies: "@eslint/eslintrc" "^1.0.4" - "@typescript-eslint/eslint-plugin" "*" - "@typescript-eslint/parser" "*" + "@typescript-eslint/eslint-plugin" "^5.4.0" + "@typescript-eslint/parser" "^5.4.0" arrify "^3.0.0" cosmiconfig "^7.0.1" define-lazy-prop "^3.0.0" eslint "^8.3.0" eslint-config-prettier "^8.3.0" eslint-config-xo "^0.39.0" - eslint-config-xo-typescript "*" + eslint-config-xo-typescript "^0.47.1" eslint-formatter-pretty "^4.1.0" eslint-import-resolver-webpack "^0.13.2" eslint-plugin-ava "^13.1.0" From 0fb92a7d6f5d2820f1205448666be3fd5086fcbc Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:25:37 +0200 Subject: [PATCH 03/50] :test_tube: test(api): Exhaustive testing of from on small iterables. --- package.json | 1 + test/src/_fixtures.js | 34 + test/src/regression/fast/from_medium_list.js | 32 + yarn.lock | 2817 +++++------------- 4 files changed, 839 insertions(+), 2045 deletions(-) create mode 100644 test/src/_fixtures.js create mode 100644 test/src/regression/fast/from_medium_list.js diff --git a/package.json b/package.json index a53f08a3..823b22a5 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,7 @@ "@iterable-iterator/list": "1.0.1", "@iterable-iterator/map": "1.0.1", "@iterable-iterator/range": "2.1.0", + "@iterable-iterator/reduce": "^1.0.1", "@iterable-iterator/repeat": "1.0.1", "@iterable-iterator/reversed": "1.0.0", "@iterable-iterator/tee": "2.0.0", diff --git a/test/src/_fixtures.js b/test/src/_fixtures.js new file mode 100644 index 00000000..51d93831 --- /dev/null +++ b/test/src/_fixtures.js @@ -0,0 +1,34 @@ +import {map} from '@iterable-iterator/map'; +import {reduce} from '@iterable-iterator/reduce'; + +import {Measures} from '@functional-abstraction/measure'; + +export const ABSTRACT_COUNTER = Measures.COUNTER; + +export const FAST_COUNTER = { + plus(a, b) { + return a + b; + }, + measure(_x) { + return 1; + }, + zero() { + return 0; + }, +}; + +export const measure = (M, iterable) => + reduce(M.plus.bind(M), map(M.measure.bind(M), iterable), M.zero()); + +export const measureToString = (M) => { + switch (M) { + case FAST_COUNTER: + return 'COUNTER(FAST)'; + case ABSTRACT_COUNTER: + return 'COUNTER(ABSTRACT)'; + default: + throw new Error(`unknown measure ${M.name}`); + } +}; + +export const iterableToString = (iterable) => iterable.toString(); diff --git a/test/src/regression/fast/from_medium_list.js b/test/src/regression/fast/from_medium_list.js new file mode 100644 index 00000000..5550a609 --- /dev/null +++ b/test/src/regression/fast/from_medium_list.js @@ -0,0 +1,32 @@ +import test from 'ava'; + +import {range} from '@iterable-iterator/range'; +import {tee} from '@iterable-iterator/tee'; + +import { + ABSTRACT_COUNTER as COUNTER, + measure, + measureToString, + iterableToString, +} from '../../_fixtures.js'; + +import {from} from '../../../../src/index.js'; + +const cover = (t, M, iterable) => { + const [copy1, copy2, copy3] = tee(iterable, 3); + + const tree = from(M, copy1); + + const expectedMeasure = measure(M, copy2); + t.is(tree.measure(), expectedMeasure); + + const expectedContents = Array.from(copy3); + t.deepEqual(Array.from(tree), expectedContents); +}; + +cover.title = (title, M, iterable) => + title ?? `${measureToString(M)} ${iterableToString(iterable)}`; + +for (const i of range(145)) { + test(cover, COUNTER, range(i)); +} diff --git a/yarn.lock b/yarn.lock index 3bdecc8f..a0356267 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,36 +2,19 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== - dependencies: - "@babel/highlight" "^7.14.5" - -"@babel/code-frame@^7.16.0": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== dependencies: "@babel/highlight" "^7.16.0" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7", "@babel/compat-data@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" - integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== - -"@babel/compat-data@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.0.tgz#ea269d7f78deb3a7826c39a4048eecda541ebdaa" - integrity sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew== - -"@babel/compat-data@^7.16.4": +"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.0", "@babel/compat-data@^7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== -"@babel/core@7.16.0": +"@babel/core@7.16.0", "@babel/core@^7.12.10", "@babel/core@^7.12.16": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ== @@ -52,28 +35,7 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/core@^7.12.10", "@babel/core@^7.12.16": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" - integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.15.0" - "@babel/helper-compilation-targets" "^7.15.0" - "@babel/helper-module-transforms" "^7.15.0" - "@babel/helpers" "^7.14.8" - "@babel/parser" "^7.15.0" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.15.0" - "@babel/types" "^7.15.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/eslint-parser@7.16.3": +"@babel/eslint-parser@7.16.3", "@babel/eslint-parser@^7.12.16": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz#2a6b1702f3f5aea48e00cea5a5bcc241c437e459" integrity sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ== @@ -82,25 +44,7 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/eslint-parser@^7.12.16": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.15.0.tgz#b54f06e04d0e93aebcba99f89251e3bf0ee39f21" - integrity sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw== - dependencies: - eslint-scope "^5.1.1" - eslint-visitor-keys "^2.1.0" - semver "^6.3.0" - -"@babel/generator@^7.0.0", "@babel/generator@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" - integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== - dependencies: - "@babel/types" "^7.15.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/generator@^7.16.0": +"@babel/generator@^7.0.0", "@babel/generator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.0.tgz#d40f3d1d5075e62d3500bccb67f3daa8a95265b2" integrity sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew== @@ -109,13 +53,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61" - integrity sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-annotate-as-pure@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz#9a1f0ebcda53d9a2d00108c4ceace6a5d5f1f08d" @@ -123,14 +60,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz#b939b43f8c37765443a19ae74ad8b15978e0a191" - integrity sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.14.5" - "@babel/types" "^7.14.5" - "@babel/helper-builder-binary-assignment-operator-visitor@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.0.tgz#f1a686b92da794020c26582eb852e9accd0d7882" @@ -139,27 +68,7 @@ "@babel/helper-explode-assignable-expression" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.14.5", "@babel/helper-compilation-targets@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" - integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== - dependencies: - "@babel/compat-data" "^7.15.0" - "@babel/helper-validator-option" "^7.14.5" - browserslist "^4.16.6" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.0.tgz#01d615762e796c17952c29e3ede9d6de07d235a8" - integrity sha512-S7iaOT1SYlqK0sQaCi21RX4+13hmdmnxIEAnQUB/eh7GeAnRjOUgTYpLkUOiRXzD+yog1JxP0qyAQZ7ZxVxLVg== - dependencies: - "@babel/compat-data" "^7.16.0" - "@babel/helper-validator-option" "^7.14.5" - browserslist "^4.16.6" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.16.3": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.0", "@babel/helper-compilation-targets@^7.16.3": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz#5b480cd13f68363df6ec4dc8ac8e2da11363cbf0" integrity sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA== @@ -169,19 +78,7 @@ browserslist "^4.17.5" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.14.5": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz#c9a137a4d137b2d0e2c649acf536d7ba1a76c0f7" - integrity sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q== - dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-member-expression-to-functions" "^7.15.0" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/helper-replace-supers" "^7.15.0" - "@babel/helper-split-export-declaration" "^7.14.5" - -"@babel/helper-create-class-features-plugin@^7.16.0": +"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz#090d4d166b342a03a9fec37ef4fd5aeb9c7c6a4b" integrity sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA== @@ -193,14 +90,6 @@ "@babel/helper-replace-supers" "^7.16.0" "@babel/helper-split-export-declaration" "^7.16.0" -"@babel/helper-create-regexp-features-plugin@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" - integrity sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - regexpu-core "^4.7.1" - "@babel/helper-create-regexp-features-plugin@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.0.tgz#06b2348ce37fccc4f5e18dcd8d75053f2a7c44ff" @@ -209,20 +98,6 @@ "@babel/helper-annotate-as-pure" "^7.16.0" regexpu-core "^4.7.1" -"@babel/helper-define-polyfill-provider@^0.2.2": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz#0525edec5094653a282688d34d846e4c75e9c0b6" - integrity sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew== - dependencies: - "@babel/helper-compilation-targets" "^7.13.0" - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/traverse" "^7.13.0" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - "@babel/helper-define-polyfill-provider@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz#c5b10cf4b324ff840140bb07e05b8564af2ae971" @@ -237,13 +112,6 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-explode-assignable-expression@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz#8aa72e708205c7bb643e45c73b4386cdf2a1f645" - integrity sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-explode-assignable-expression@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz#753017337a15f46f9c09f674cff10cee9b9d7778" @@ -251,15 +119,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-function-name@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" - integrity sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ== - dependencies: - "@babel/helper-get-function-arity" "^7.14.5" - "@babel/template" "^7.14.5" - "@babel/types" "^7.14.5" - "@babel/helper-function-name@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481" @@ -269,13 +128,6 @@ "@babel/template" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-get-function-arity@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" - integrity sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-get-function-arity@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa" @@ -283,13 +135,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-hoist-variables@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" - integrity sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-hoist-variables@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz#4c9023c2f1def7e28ff46fc1dbcd36a39beaa81a" @@ -297,13 +142,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-member-expression-to-functions@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" - integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== - dependencies: - "@babel/types" "^7.15.0" - "@babel/helper-member-expression-to-functions@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz#29287040efd197c77636ef75188e81da8bccd5a4" @@ -311,34 +149,13 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" - integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== - dependencies: - "@babel/types" "^7.14.5" - -"@babel/helper-module-imports@^7.16.0": +"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3" integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" - integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== - dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.15.0" - "@babel/helper-simple-access" "^7.14.8" - "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.9" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.15.0" - "@babel/types" "^7.15.0" - "@babel/helper-module-transforms@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz#1c82a8dd4cb34577502ebd2909699b194c3e9bb5" @@ -353,13 +170,6 @@ "@babel/traverse" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-optimise-call-expression@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" - integrity sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-optimise-call-expression@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz#cecdb145d70c54096b1564f8e9f10cd7d193b338" @@ -372,25 +182,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== -"@babel/helper-remap-async-to-generator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz#51439c913612958f54a987a4ffc9ee587a2045d6" - integrity sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-wrap-function" "^7.14.5" - "@babel/types" "^7.14.5" - -"@babel/helper-remap-async-to-generator@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.0.tgz#d5aa3b086e13a5fe05238ff40c3a5a0c2dab3ead" - integrity sha512-MLM1IOMe9aQBqMWxcRw8dcb9jlM86NIw7KA0Wri91Xkfied+dE0QuBFSBjMNvqzmS0OSIDsMNC24dBEkPUi7ew== - dependencies: - "@babel/helper-annotate-as-pure" "^7.16.0" - "@babel/helper-wrap-function" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/helper-remap-async-to-generator@^7.16.4": +"@babel/helper-remap-async-to-generator@^7.16.0", "@babel/helper-remap-async-to-generator@^7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz#5d7902f61349ff6b963e07f06a389ce139fbfe6e" integrity sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA== @@ -399,16 +191,6 @@ "@babel/helper-wrap-function" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-replace-supers@^7.14.5", "@babel/helper-replace-supers@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" - integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.15.0" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/traverse" "^7.15.0" - "@babel/types" "^7.15.0" - "@babel/helper-replace-supers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz#73055e8d3cf9bcba8ddb55cad93fedc860f68f17" @@ -419,13 +201,6 @@ "@babel/traverse" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-simple-access@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" - integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== - dependencies: - "@babel/types" "^7.14.8" - "@babel/helper-simple-access@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz#21d6a27620e383e37534cf6c10bba019a6f90517" @@ -433,13 +208,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-skip-transparent-expression-wrappers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz#96f486ac050ca9f44b009fbe5b7d394cab3a0ee4" - integrity sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" @@ -447,13 +215,6 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-split-export-declaration@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a" - integrity sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA== - dependencies: - "@babel/types" "^7.14.5" - "@babel/helper-split-export-declaration@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438" @@ -461,12 +222,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" - integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== - -"@babel/helper-validator-identifier@^7.15.7": +"@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== @@ -476,16 +232,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== -"@babel/helper-wrap-function@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz#5919d115bf0fe328b8a5d63bcb610f51601f2bff" - integrity sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ== - dependencies: - "@babel/helper-function-name" "^7.14.5" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" - "@babel/helper-wrap-function@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.0.tgz#b3cf318afce774dfe75b86767cd6d68f3482e57c" @@ -496,33 +242,15 @@ "@babel/traverse" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helpers@^7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.8.tgz#839f88f463025886cff7f85a35297007e2da1b77" - integrity sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw== - dependencies: - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.8" - "@babel/types" "^7.14.8" - "@babel/helpers@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.0.tgz#875519c979c232f41adfbd43a3b0398c2e388183" - integrity sha512-dVRM0StFMdKlkt7cVcGgwD8UMaBfWJHl3A83Yfs8GQ3MO0LHIIIMvK7Fa0RGOGUQ10qikLaX6D7o5htcQWgTMQ== + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.3.tgz#27fc64f40b996e7074dc73128c3e5c3e7f55c43c" + integrity sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w== dependencies: "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.0" + "@babel/traverse" "^7.16.3" "@babel/types" "^7.16.0" -"@babel/highlight@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" - integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@babel/highlight@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.0.tgz#6ceb32b2ca4b8f5f361fb7fd821e3fddf4a1725a" @@ -532,15 +260,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.14.5", "@babel/parser@^7.15.0", "@babel/parser@^7.3.3": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.0.tgz#b6d6e29058ca369127b0eeca2a1c4b5794f1b6b9" - integrity sha512-0v7oNOjr6YT9Z2RAOTv4T9aP+ubfx4Q/OhVtAet7PFDt0t9Oy6Jn+/rfC6b8HJ5zEqrQCiMxJfgtHpmIminmJQ== - -"@babel/parser@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.0.tgz#cf147d7ada0a3655e79bf4b08ee846f00a00a295" - integrity sha512-TEHWXf0xxpi9wKVyBCmRcSSDjbJ/cl6LUdlbYUHEaNQUJGhreJbZrXT6sR4+fZLxVUJqNRB4KyOvjuy/D9009A== +"@babel/parser@^7.0.0", "@babel/parser@^7.16.0", "@babel/parser@^7.16.3", "@babel/parser@^7.3.3": + version "7.16.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e" + integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.2": version "7.16.2" @@ -549,15 +272,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e" - integrity sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" - "@babel/plugin-proposal-optional-chaining" "^7.14.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.0.tgz#358972eaab006f5eb0826183b0c93cbcaf13e1e2" @@ -567,15 +281,6 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-proposal-optional-chaining" "^7.16.0" -"@babel/plugin-proposal-async-generator-functions@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz#7028dc4fa21dc199bbacf98b39bab1267d0eaf9a" - integrity sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-remap-async-to-generator" "^7.14.5" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-proposal-async-generator-functions@^7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz#e606eb6015fec6fa5978c940f315eae4e300b081" @@ -593,14 +298,6 @@ "@babel/helper-create-class-features-plugin" "^7.12.1" "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-proposal-class-properties@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz#40d1ee140c5b1e31a350f4f5eed945096559b42e" - integrity sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-proposal-class-properties@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz#c029618267ddebc7280fa286e0f8ca2a278a2d1a" @@ -609,15 +306,6 @@ "@babel/helper-create-class-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-proposal-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz#158e9e10d449c3849ef3ecde94a03d9f1841b681" - integrity sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-proposal-class-static-block@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.0.tgz#5296942c564d8144c83eea347d0aa8a0b89170e7" @@ -627,14 +315,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-proposal-dynamic-import@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz#0c6617df461c0c1f8fff3b47cd59772360101d2c" - integrity sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-proposal-dynamic-import@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.0.tgz#783eca61d50526202f9b296095453977e88659f1" @@ -643,14 +323,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz#dbad244310ce6ccd083072167d8cea83a52faf76" - integrity sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-proposal-export-namespace-from@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.0.tgz#9c01dee40b9d6b847b656aaf4a3976a71740f222" @@ -659,14 +331,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz#38de60db362e83a3d8c944ac858ddf9f0c2239eb" - integrity sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-proposal-json-strings@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.0.tgz#cae35a95ed1d2a7fa29c4dc41540b84a72e9ab25" @@ -675,14 +339,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz#6e6229c2a99b02ab2915f82571e0cc646a40c738" - integrity sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-proposal-logical-assignment-operators@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.0.tgz#a711b8ceb3ffddd3ef88d3a49e86dbd3cc7db3fd" @@ -691,14 +347,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz#ee38589ce00e2cc59b299ec3ea406fcd3a0fdaf6" - integrity sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.0.tgz#44e1cce08fe2427482cf446a91bb451528ed0596" @@ -707,14 +355,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz#83631bf33d9a51df184c2102a069ac0c58c05f18" - integrity sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-proposal-numeric-separator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.0.tgz#5d418e4fbbf8b9b7d03125d3a52730433a373734" @@ -723,17 +363,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz#5920a2b3df7f7901df0205974c0641b13fd9d363" - integrity sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g== - dependencies: - "@babel/compat-data" "^7.14.7" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.14.5" - "@babel/plugin-proposal-object-rest-spread@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.0.tgz#5fb32f6d924d6e6712810362a60e12a2609872e6" @@ -745,14 +374,6 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.16.0" -"@babel/plugin-proposal-optional-catch-binding@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz#939dd6eddeff3a67fdf7b3f044b5347262598c3c" - integrity sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-proposal-optional-catch-binding@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.0.tgz#5910085811ab4c28b00d6ebffa4ab0274d1e5f16" @@ -761,15 +382,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz#fa83651e60a360e3f13797eef00b8d519695b603" - integrity sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-proposal-optional-chaining@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz#56dbc3970825683608e9efb55ea82c2a2d6c8dc0" @@ -779,14 +391,6 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz#37446495996b2945f30f5be5b60d5e2aa4f5792d" - integrity sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-proposal-private-methods@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.0.tgz#b4dafb9c717e4301c5776b30d080d6383c89aff6" @@ -795,16 +399,6 @@ "@babel/helper-create-class-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-proposal-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz#9f65a4d0493a940b4c01f8aa9d3f1894a587f636" - integrity sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q== - dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-proposal-private-property-in-object@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.0.tgz#69e935b2c5c79d2488112d886f0c4e2790fee76f" @@ -815,15 +409,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.14.5", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" - integrity sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.16.0": +"@babel/plugin-proposal-unicode-property-regex@^7.16.0", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.0.tgz#890482dfc5ea378e42e19a71e709728cabf18612" integrity sha512-ti7IdM54NXv29cA4+bNNKEMS4jLMCbJgl+Drv+FgYy0erJLAxNAIXcNjNjrRZEcWq0xJHsNVwQezskMFpF8N9g== @@ -866,10 +452,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz#2ff654999497d7d7d142493260005263731da180" - integrity sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q== +"@babel/plugin-syntax-flow@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.0.tgz#07427021d093ed77019408221beaf0272bbcfaec" + integrity sha512-dH91yCo0RyqfzWgoM5Ji9ir8fQ+uFbt9KHM3d2x4jZOuHS6wNA+CRmRUP/BWCsHG2bjc7A2Way6AvH1eQk0wig== dependencies: "@babel/helper-plugin-utils" "^7.14.5" @@ -887,10 +473,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.12.1", "@babel/plugin-syntax-jsx@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz#000e2e25d8673cce49300517a3eda44c263e4201" - integrity sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw== +"@babel/plugin-syntax-jsx@^7.12.1", "@babel/plugin-syntax-jsx@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.0.tgz#f9624394317365a9a88c82358d3f8471154698f1" + integrity sha512-8zv2+xiPHwly31RK4RmnEYY5zziuF3O7W2kIDW+07ewWDh6Oi0dRq8kwvulRkFgt6DB97RlKs5c1y068iPlCUg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" @@ -950,13 +536,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-arrow-functions@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz#f7187d9588a768dd080bf4c9ffe117ea62f7862a" - integrity sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-arrow-functions@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.0.tgz#951706f8b449c834ed07bd474c0924c944b95a8e" @@ -964,15 +543,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-async-to-generator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz#72c789084d8f2094acb945633943ef8443d39e67" - integrity sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA== - dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-remap-async-to-generator" "^7.14.5" - "@babel/plugin-transform-async-to-generator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.0.tgz#df12637f9630ddfa0ef9d7a11bc414d629d38604" @@ -982,13 +552,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.16.0" -"@babel/plugin-transform-block-scoped-functions@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz#e48641d999d4bc157a67ef336aeb54bc44fd3ad4" - integrity sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-block-scoped-functions@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.0.tgz#c618763233ad02847805abcac4c345ce9de7145d" @@ -996,13 +559,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-block-scoping@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz#8cc63e61e50f42e078e6f09be775a75f23ef9939" - integrity sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-block-scoping@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.0.tgz#bcf433fb482fe8c3d3b4e8a66b1c4a8e77d37c16" @@ -1010,19 +566,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-classes@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz#2a391ffb1e5292710b00f2e2c210e1435e7d449f" - integrity sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-split-export-declaration" "^7.14.5" - globals "^11.1.0" - "@babel/plugin-transform-classes@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.0.tgz#54cf5ff0b2242c6573d753cd4bfc7077a8b282f5" @@ -1036,13 +579,6 @@ "@babel/helper-split-export-declaration" "^7.16.0" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz#1b9d78987420d11223d41195461cc43b974b204f" - integrity sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-computed-properties@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.0.tgz#e0c385507d21e1b0b076d66bed6d5231b85110b7" @@ -1050,13 +586,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-destructuring@^7.14.7": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz#0ad58ed37e23e22084d109f185260835e5557576" - integrity sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-destructuring@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.0.tgz#ad3d7e74584ad5ea4eadb1e6642146c590dee33c" @@ -1064,15 +593,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-dotall-regex@^7.14.5", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" - integrity sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-dotall-regex@^7.16.0": +"@babel/plugin-transform-dotall-regex@^7.16.0", "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.0.tgz#50bab00c1084b6162d0a58a818031cf57798e06f" integrity sha512-FXlDZfQeLILfJlC6I1qyEwcHK5UpRCFkaoVyA1nk9A1L1Yu583YO4un2KsLBsu3IJb4CUbctZks8tD9xPQubLw== @@ -1080,13 +601,6 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-duplicate-keys@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz#365a4844881bdf1501e3a9f0270e7f0f91177954" - integrity sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-duplicate-keys@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.0.tgz#8bc2e21813e3e89e5e5bf3b60aa5fc458575a176" @@ -1094,14 +608,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-exponentiation-operator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz#5154b8dd6a3dfe6d90923d61724bd3deeb90b493" - integrity sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-exponentiation-operator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.0.tgz#a180cd2881e3533cef9d3901e48dad0fbeff4be4" @@ -1110,20 +616,13 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-flow-strip-types@^7.12.10", "@babel/plugin-transform-flow-strip-types@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz#0dc9c1d11dcdc873417903d6df4bed019ef0f85e" - integrity sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-flow" "^7.14.5" - -"@babel/plugin-transform-for-of@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz#dae384613de8f77c196a8869cbf602a44f7fc0eb" - integrity sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA== +"@babel/plugin-transform-flow-strip-types@^7.12.10", "@babel/plugin-transform-flow-strip-types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.0.tgz#edd968dc2041c1b69e451a262e948d6654a79dc2" + integrity sha512-vs/F5roOaO/+WxKfp9PkvLsAyj0G+Q0zbFimHm9X2KDgabN2XmNFoAafmeGEYspUlIF9+MvVmyek9UyHiqeG/w== dependencies: "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-flow" "^7.16.0" "@babel/plugin-transform-for-of@^7.16.0": version "7.16.0" @@ -1132,14 +631,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-function-name@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz#e81c65ecb900746d7f31802f6bed1f52d915d6f2" - integrity sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ== - dependencies: - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-function-name@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.0.tgz#02e3699c284c6262236599f751065c5d5f1f400e" @@ -1148,13 +639,6 @@ "@babel/helper-function-name" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz#41d06c7ff5d4d09e3cf4587bd3ecf3930c730f78" - integrity sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-literals@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.0.tgz#79711e670ffceb31bd298229d50f3621f7980cac" @@ -1162,13 +646,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-member-expression-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz#b39cd5212a2bf235a617d320ec2b48bcc091b8a7" - integrity sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-member-expression-literals@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.0.tgz#5251b4cce01eaf8314403d21aedb269d79f5e64b" @@ -1176,15 +653,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-modules-amd@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz#4fd9ce7e3411cb8b83848480b7041d83004858f7" - integrity sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g== - dependencies: - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - babel-plugin-dynamic-import-node "^2.3.3" - "@babel/plugin-transform-modules-amd@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.0.tgz#09abd41e18dcf4fd479c598c1cef7bd39eb1337e" @@ -1194,16 +662,6 @@ "@babel/helper-plugin-utils" "^7.14.5" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz#3305896e5835f953b5cdb363acd9e8c2219a5281" - integrity sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig== - dependencies: - "@babel/helper-module-transforms" "^7.15.0" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-simple-access" "^7.14.8" - babel-plugin-dynamic-import-node "^2.3.3" - "@babel/plugin-transform-modules-commonjs@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz#add58e638c8ddc4875bd9a9ecb5c594613f6c922" @@ -1214,17 +672,6 @@ "@babel/helper-simple-access" "^7.16.0" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz#c75342ef8b30dcde4295d3401aae24e65638ed29" - integrity sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA== - dependencies: - "@babel/helper-hoist-variables" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.5" - babel-plugin-dynamic-import-node "^2.3.3" - "@babel/plugin-transform-modules-systemjs@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.0.tgz#a92cf240afeb605f4ca16670453024425e421ea4" @@ -1236,14 +683,6 @@ "@babel/helper-validator-identifier" "^7.15.7" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz#fb662dfee697cce274a7cda525190a79096aa6e0" - integrity sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA== - dependencies: - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-modules-umd@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.0.tgz#195f26c2ad6d6a391b70880effce18ce625e06a7" @@ -1252,13 +691,6 @@ "@babel/helper-module-transforms" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz#c68f5c5d12d2ebaba3762e57c2c4f6347a46e7b2" - integrity sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" - "@babel/plugin-transform-named-capturing-groups-regex@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.0.tgz#d3db61cc5d5b97986559967cd5ea83e5c32096ca" @@ -1266,13 +698,6 @@ dependencies: "@babel/helper-create-regexp-features-plugin" "^7.16.0" -"@babel/plugin-transform-new-target@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz#31bdae8b925dc84076ebfcd2a9940143aed7dbf8" - integrity sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-new-target@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.0.tgz#af823ab576f752215a49937779a41ca65825ab35" @@ -1280,14 +705,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-object-super@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz#d0b5faeac9e98597a161a9cf78c527ed934cdc45" - integrity sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/plugin-transform-object-super@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.0.tgz#fb20d5806dc6491a06296ac14ea8e8d6fedda72b" @@ -1296,34 +713,13 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-replace-supers" "^7.16.0" -"@babel/plugin-transform-parameters@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz#49662e86a1f3ddccac6363a7dfb1ff0a158afeb3" - integrity sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-parameters@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.0.tgz#1b50765fc421c229819dc4c7cdb8911660b3c2d7" - integrity sha512-XgnQEm1CevKROPx+udOi/8f8TiGhrUWiHiaUCIp47tE0tpFDjzXNTZc9E5CmCwxNjXTWEVqvRfWZYOTFvMa/ZQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-parameters@^7.16.3": +"@babel/plugin-transform-parameters@^7.16.0", "@babel/plugin-transform-parameters@^7.16.3": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.3.tgz#fa9e4c874ee5223f891ee6fa8d737f4766d31d15" integrity sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-property-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz#0ddbaa1f83db3606f1cdf4846fa1dfb473458b34" - integrity sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-property-literals@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.0.tgz#a95c552189a96a00059f6776dc4e00e3690c78d1" @@ -1331,60 +727,46 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-react-display-name@^7.14.5": - version "7.15.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz#6aaac6099f1fcf6589d35ae6be1b6e10c8c602b9" - integrity sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q== +"@babel/plugin-transform-react-display-name@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.0.tgz#9a0ad8aa8e8790883a7bd2736f66229a58125676" + integrity sha512-FJFdJAqaCpndL+pIf0aeD/qlQwT7QXOvR6Cc8JPvNhKJBi2zc/DPc4g05Y3fbD/0iWAMQFGij4+Xw+4L/BMpTg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-react-jsx-development@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz#1a6c73e2f7ed2c42eebc3d2ad60b0c7494fcb9af" - integrity sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ== +"@babel/plugin-transform-react-jsx-development@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.0.tgz#1cb52874678d23ab11d0d16488d54730807303ef" + integrity sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw== dependencies: - "@babel/plugin-transform-react-jsx" "^7.14.5" + "@babel/plugin-transform-react-jsx" "^7.16.0" -"@babel/plugin-transform-react-jsx@^7.12.11", "@babel/plugin-transform-react-jsx@^7.14.5": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz#3314b2163033abac5200a869c4de242cd50a914c" - integrity sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw== +"@babel/plugin-transform-react-jsx@^7.12.11", "@babel/plugin-transform-react-jsx@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz#55b797d4960c3de04e07ad1c0476e2bc6a4889f1" + integrity sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-annotate-as-pure" "^7.16.0" + "@babel/helper-module-imports" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-jsx" "^7.14.5" - "@babel/types" "^7.14.9" + "@babel/plugin-syntax-jsx" "^7.16.0" + "@babel/types" "^7.16.0" -"@babel/plugin-transform-react-pure-annotations@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz#18de612b84021e3a9802cbc212c9d9f46d0d11fc" - integrity sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g== +"@babel/plugin-transform-react-pure-annotations@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.0.tgz#23db6ddf558d8abde41b8ad9d59f48ad5532ccab" + integrity sha512-NC/Bj2MG+t8Ef5Pdpo34Ay74X4Rt804h5y81PwOpfPtmAK3i6CizmQqwyBQzIepz1Yt8wNr2Z2L7Lu3qBMfZMA== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" + "@babel/helper-annotate-as-pure" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-regenerator@^7.12.1", "@babel/plugin-transform-regenerator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz#9676fd5707ed28f522727c5b3c0aa8544440b04f" - integrity sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg== - dependencies: - regenerator-transform "^0.14.2" - -"@babel/plugin-transform-regenerator@^7.16.0": +"@babel/plugin-transform-regenerator@^7.12.1", "@babel/plugin-transform-regenerator@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.0.tgz#eaee422c84b0232d03aea7db99c97deeaf6125a4" integrity sha512-JAvGxgKuwS2PihiSFaDrp94XOzzTUeDeOQlcKzVAyaPap7BnZXK/lvMDiubkPTdotPKOIZq9xWXWnggUMYiExg== dependencies: regenerator-transform "^0.14.2" -"@babel/plugin-transform-reserved-words@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz#c44589b661cfdbef8d4300dcc7469dffa92f8304" - integrity sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-reserved-words@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.0.tgz#fff4b9dcb19e12619394bda172d14f2d04c0379c" @@ -1392,13 +774,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-shorthand-properties@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58" - integrity sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-shorthand-properties@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.0.tgz#090372e3141f7cc324ed70b3daf5379df2fa384d" @@ -1406,14 +781,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-spread@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144" - integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" - "@babel/plugin-transform-spread@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.0.tgz#d21ca099bbd53ab307a8621e019a7bd0f40cdcfb" @@ -1422,13 +789,6 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" -"@babel/plugin-transform-sticky-regex@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz#5b617542675e8b7761294381f3c28c633f40aeb9" - integrity sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-sticky-regex@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.0.tgz#c35ea31a02d86be485f6aa510184b677a91738fd" @@ -1436,13 +796,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-template-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz#a5f2bc233937d8453885dc736bdd8d9ffabf3d93" - integrity sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-template-literals@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.0.tgz#a8eced3a8e7b8e2d40ec4ec4548a45912630d302" @@ -1450,13 +803,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-typeof-symbol@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz#39af2739e989a2bd291bf6b53f16981423d457d4" - integrity sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-typeof-symbol@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.0.tgz#8b19a244c6f8c9d668dca6a6f754ad6ead1128f2" @@ -1464,13 +810,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-unicode-escapes@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b" - integrity sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-unicode-escapes@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz#1a354064b4c45663a32334f46fa0cf6100b5b1f3" @@ -1478,14 +817,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-unicode-regex@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz#4cd09b6c8425dd81255c7ceb3fb1836e7414382e" - integrity sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-transform-unicode-regex@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.0.tgz#293b80950177c8c85aede87cef280259fb995402" @@ -1494,7 +825,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/preset-env@7.16.4": +"@babel/preset-env@7.16.4", "@babel/preset-env@^7.12.11": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.4.tgz#4f6ec33b2a3fe72d6bfdcdf3859500232563a2e3" integrity sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA== @@ -1574,104 +905,14 @@ core-js-compat "^3.19.1" semver "^6.3.0" -"@babel/preset-env@^7.12.11": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.15.0.tgz#e2165bf16594c9c05e52517a194bf6187d6fe464" - integrity sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q== - dependencies: - "@babel/compat-data" "^7.15.0" - "@babel/helper-compilation-targets" "^7.15.0" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5" - "@babel/plugin-proposal-async-generator-functions" "^7.14.9" - "@babel/plugin-proposal-class-properties" "^7.14.5" - "@babel/plugin-proposal-class-static-block" "^7.14.5" - "@babel/plugin-proposal-dynamic-import" "^7.14.5" - "@babel/plugin-proposal-export-namespace-from" "^7.14.5" - "@babel/plugin-proposal-json-strings" "^7.14.5" - "@babel/plugin-proposal-logical-assignment-operators" "^7.14.5" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5" - "@babel/plugin-proposal-numeric-separator" "^7.14.5" - "@babel/plugin-proposal-object-rest-spread" "^7.14.7" - "@babel/plugin-proposal-optional-catch-binding" "^7.14.5" - "@babel/plugin-proposal-optional-chaining" "^7.14.5" - "@babel/plugin-proposal-private-methods" "^7.14.5" - "@babel/plugin-proposal-private-property-in-object" "^7.14.5" - "@babel/plugin-proposal-unicode-property-regex" "^7.14.5" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.14.5" - "@babel/plugin-transform-async-to-generator" "^7.14.5" - "@babel/plugin-transform-block-scoped-functions" "^7.14.5" - "@babel/plugin-transform-block-scoping" "^7.14.5" - "@babel/plugin-transform-classes" "^7.14.9" - "@babel/plugin-transform-computed-properties" "^7.14.5" - "@babel/plugin-transform-destructuring" "^7.14.7" - "@babel/plugin-transform-dotall-regex" "^7.14.5" - "@babel/plugin-transform-duplicate-keys" "^7.14.5" - "@babel/plugin-transform-exponentiation-operator" "^7.14.5" - "@babel/plugin-transform-for-of" "^7.14.5" - "@babel/plugin-transform-function-name" "^7.14.5" - "@babel/plugin-transform-literals" "^7.14.5" - "@babel/plugin-transform-member-expression-literals" "^7.14.5" - "@babel/plugin-transform-modules-amd" "^7.14.5" - "@babel/plugin-transform-modules-commonjs" "^7.15.0" - "@babel/plugin-transform-modules-systemjs" "^7.14.5" - "@babel/plugin-transform-modules-umd" "^7.14.5" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.9" - "@babel/plugin-transform-new-target" "^7.14.5" - "@babel/plugin-transform-object-super" "^7.14.5" - "@babel/plugin-transform-parameters" "^7.14.5" - "@babel/plugin-transform-property-literals" "^7.14.5" - "@babel/plugin-transform-regenerator" "^7.14.5" - "@babel/plugin-transform-reserved-words" "^7.14.5" - "@babel/plugin-transform-shorthand-properties" "^7.14.5" - "@babel/plugin-transform-spread" "^7.14.6" - "@babel/plugin-transform-sticky-regex" "^7.14.5" - "@babel/plugin-transform-template-literals" "^7.14.5" - "@babel/plugin-transform-typeof-symbol" "^7.14.5" - "@babel/plugin-transform-unicode-escapes" "^7.14.5" - "@babel/plugin-transform-unicode-regex" "^7.14.5" - "@babel/preset-modules" "^0.1.4" - "@babel/types" "^7.15.0" - babel-plugin-polyfill-corejs2 "^0.2.2" - babel-plugin-polyfill-corejs3 "^0.2.2" - babel-plugin-polyfill-regenerator "^0.2.2" - core-js-compat "^3.16.0" - semver "^6.3.0" - "@babel/preset-flow@^7.12.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.14.5.tgz#a1810b0780c8b48ab0bece8e7ab8d0d37712751c" - integrity sha512-pP5QEb4qRUSVGzzKx9xqRuHUrM/jEzMqdrZpdMA+oUCRgd5zM1qGr5y5+ZgAL/1tVv1H0dyk5t4SKJntqyiVtg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-transform-flow-strip-types" "^7.14.5" - -"@babel/preset-modules@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" - integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.16.0.tgz#9f1f6e72714d79460d48058cb5658fc87da7150b" + integrity sha512-e5NE1EoPMpoHFkyFkMSj2h9tu7OolARcUHki8mnBv4NiFK9so+UrhbvT9mV99tMJOUEx8BOj67T6dXvGcTeYeQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-flow-strip-types" "^7.16.0" "@babel/preset-modules@^0.1.5": version "0.1.5" @@ -1685,16 +926,16 @@ esutils "^2.0.2" "@babel/preset-react@^7.12.10": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.14.5.tgz#0fbb769513f899c2c56f3a882fa79673c2d4ab3c" - integrity sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ== + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.16.0.tgz#f71d3e8dff5218478011df037fad52660ee6d82a" + integrity sha512-d31IFW2bLRB28uL1WoElyro8RH5l6531XfxMtCeCmp6RVAF1uTfxxUA0LH1tXl+psZdwfmIbwoG4U5VwgbhtLw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-transform-react-display-name" "^7.14.5" - "@babel/plugin-transform-react-jsx" "^7.14.5" - "@babel/plugin-transform-react-jsx-development" "^7.14.5" - "@babel/plugin-transform-react-pure-annotations" "^7.14.5" + "@babel/plugin-transform-react-display-name" "^7.16.0" + "@babel/plugin-transform-react-jsx" "^7.16.0" + "@babel/plugin-transform-react-jsx-development" "^7.16.0" + "@babel/plugin-transform-react-pure-annotations" "^7.16.0" "@babel/register@7.16.0": version "7.16.0" @@ -1708,21 +949,12 @@ source-map-support "^0.5.16" "@babel/runtime@^7.12.5", "@babel/runtime@^7.8.4": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" - integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5" + integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" - integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/parser" "^7.14.5" - "@babel/types" "^7.14.5" - "@babel/template@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6" @@ -1732,45 +964,22 @@ "@babel/parser" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5", "@babel/traverse@^7.14.8", "@babel/traverse@^7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" - integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.15.0" - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-hoist-variables" "^7.14.5" - "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/parser" "^7.15.0" - "@babel/types" "^7.15.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.0.tgz#965df6c6bfc0a958c1e739284d3c9fa4a6e3c45b" - integrity sha512-qQ84jIs1aRQxaGaxSysII9TuDaguZ5yVrEuC0BN2vcPlalwfLovVmCjbFDPECPXcYM/wLvNFfp8uDOliLxIoUQ== +"@babel/traverse@^7.13.0", "@babel/traverse@^7.16.0", "@babel/traverse@^7.16.3": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.3.tgz#f63e8a938cc1b780f66d9ed3c54f532ca2d14787" + integrity sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag== dependencies: "@babel/code-frame" "^7.16.0" "@babel/generator" "^7.16.0" "@babel/helper-function-name" "^7.16.0" "@babel/helper-hoist-variables" "^7.16.0" "@babel/helper-split-export-declaration" "^7.16.0" - "@babel/parser" "^7.16.0" + "@babel/parser" "^7.16.3" "@babel/types" "^7.16.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.14.9", "@babel/types@^7.15.0", "@babel/types@^7.4.4": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" - integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== - dependencies: - "@babel/helper-validator-identifier" "^7.14.9" - to-fast-properties "^2.0.0" - -"@babel/types@^7.16.0": +"@babel/types@^7.16.0", "@babel/types@^7.4.4": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== @@ -1978,9 +1187,9 @@ minimatch "^3.0.4" "@humanwhocodes/object-schema@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" - integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== "@istanbuljs/schema@^0.1.2": version "0.1.3" @@ -2024,6 +1233,13 @@ resolved "https://registry.yarnpkg.com/@iterable-iterator/range/-/range-2.1.0.tgz#d7cfeee165c612f460c9ea1854a250f4788f1226" integrity sha512-3/jhQR2FVpur0RmrHCksePYsahdZcGh7WKukDkI1xq3gwzmCQm3Nv0MwKttMf3viUGq6mV0BUHXybpLLfMCeKA== +"@iterable-iterator/reduce@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@iterable-iterator/reduce/-/reduce-1.0.1.tgz#04bd02da8166a184dcf320576e482f4261df538d" + integrity sha512-/wwXupEhGb0cwVr4MDbuweD5tZ+wtd8fr8HkWwNre1lZn76Utu0um7nnhFpm9Mk3hifZzrH5dcKLhKB3VEuL/g== + dependencies: + "@iterable-iterator/iter" "^1.0.1" + "@iterable-iterator/repeat@1.0.1", "@iterable-iterator/repeat@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/repeat/-/repeat-1.0.1.tgz#7724b993a80c014483c4f0d37c503ee460ac7b6d" @@ -2084,9 +1300,9 @@ fastq "^1.6.0" "@rollup/plugin-alias@^3.1.1": - version "3.1.5" - resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.5.tgz#73356a3a1eab2e1e2fd952f9f53cd89fc740d952" - integrity sha512-yzUaSvCC/LJPbl9rnzX3HN7vy0tq7EzHoEiQl1ofh4n5r2Rd5bj/+zcJgaGA76xbw95/JjWQyvHg9rOJp2y0oQ== + version "3.1.8" + resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.8.tgz#645fd84659e08d3d1b059408fcdf69c1dd435a6b" + integrity sha512-tf7HeSs/06wO2LPqKNY3Ckbvy0JRe7Jyn98bXnt/gfrxbe+AJucoNJlsEVi9sdgbQtXemjbakCpO/76JVgnHpA== dependencies: slash "^3.0.0" @@ -2157,18 +1373,19 @@ integrity sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg== "@sindresorhus/is@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.1.tgz#d26729db850fa327b7cacc5522252194404226f5" - integrity sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g== + version "4.2.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.0.tgz#667bfc6186ae7c9e0b45a08960c551437176e1ca" + integrity sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw== "@surma/rollup-plugin-off-main-thread@^2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.2.tgz#12e062b299c9305c1e6c30fdac89c3222e0aa83f" - integrity sha512-dOD6nGZ79RmWKDRQuC7SOGXMvDkkLwBogu+epfVFMKiy2kOUtLZkb8wV/ettuMt37YJAJKYCKUmxSbZL2LkUQg== + version "2.2.3" + resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053" + integrity sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ== dependencies: ejs "^3.1.6" json5 "^2.2.0" magic-string "^0.25.0" + string.prototype.matchall "^4.0.6" "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -2184,6 +1401,11 @@ dependencies: defer-to-connect "^2.0.0" +"@trysound/sax@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" + integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== + "@types/cacheable-request@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" @@ -2195,9 +1417,9 @@ "@types/responselike" "*" "@types/eslint@^7.2.13": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a" - integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A== + version "7.29.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.29.0.tgz#e56ddc8e542815272720bb0b4ccc2aff9c3e1c78" + integrity sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2233,9 +1455,9 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/keyv@*", "@types/keyv@^3.1.1": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.2.tgz#5d97bb65526c20b6e0845f6b0d2ade4f28604ee5" - integrity sha512-/FvAK2p4jQOaJ6CGDHJTqZcUtbZe820qIeTg7o0Shg7drB4JHeL+V/dhSaly7NXx6u8eSee+r7coT+yuJEvDLg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.3.tgz#1c9aae32872ec1f20dcdaee89a9f3ba88f465e41" + integrity sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg== dependencies: "@types/node" "*" @@ -2245,9 +1467,9 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "16.4.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.12.tgz#961e3091f263e6345d2d84afab4e047a60b4b11b" - integrity sha512-zxrTNFl9Z8boMJXs6ieqZP0wAhvkdzmHSxTlJabM16cf5G9xBc1uPRH5Bbv2omEDDiM8MzTfqTJXBf0Ba4xFWA== + version "16.11.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.10.tgz#2e3ad0a680d96367103d3e670d41c2fed3da61ae" + integrity sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2259,11 +1481,6 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/q@^1.5.1": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" - integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ== - "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -2279,12 +1496,12 @@ "@types/node" "*" "@typescript-eslint/eslint-plugin@*": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.2.0.tgz#2bdb247cc2e2afce7efbce09afb9a6f0a8a08434" - integrity sha512-qQwg7sqYkBF4CIQSyRQyqsYvP+g/J0To9ZPVNJpfxfekl5RmdvQnFFTVVwpRtaUDFNvjfe/34TgY/dpc3MgNTw== + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.5.0.tgz#12d5f47f127af089b985f3a205c0e34a812f8fce" + integrity sha512-4bV6fulqbuaO9UMXU0Ia0o6z6if+kmMRW8rMRyfqXj/eGrZZRGedS4n0adeGNnjr8LKAM495hrQ7Tea52UWmQA== dependencies: - "@typescript-eslint/experimental-utils" "5.2.0" - "@typescript-eslint/scope-manager" "5.2.0" + "@typescript-eslint/experimental-utils" "5.5.0" + "@typescript-eslint/scope-manager" "5.5.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -2292,60 +1509,60 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.2.0.tgz#e3b2cb9cd0aff9b50f68d9a414c299fd26b067e6" - integrity sha512-fWyT3Agf7n7HuZZRpvUYdFYbPk3iDCq6fgu3ulia4c7yxmPnwVBovdSOX7RL+k8u6hLbrXcdAehlWUVpGh6IEw== +"@typescript-eslint/experimental-utils@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.5.0.tgz#3fe2514dc2f3cd95562206e4058435ea51df609e" + integrity sha512-kjWeeVU+4lQ1SLYErRKV5yDXbWDPkpbzTUUlfAUifPYvpX0qZlrcCZ96/6oWxt3QxtK5WVhXz+KsnwW9cIW+3A== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.2.0" - "@typescript-eslint/types" "5.2.0" - "@typescript-eslint/typescript-estree" "5.2.0" + "@typescript-eslint/scope-manager" "5.5.0" + "@typescript-eslint/types" "5.5.0" + "@typescript-eslint/typescript-estree" "5.5.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" "@typescript-eslint/parser@*": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.2.0.tgz#dc081aa89de16b5676b10215519af3aa7b58fb72" - integrity sha512-Uyy4TjJBlh3NuA8/4yIQptyJb95Qz5PX//6p8n7zG0QnN4o3NF9Je3JHbVU7fxf5ncSXTmnvMtd/LDQWDk0YqA== + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.5.0.tgz#a38070e225330b771074daa659118238793f7fcd" + integrity sha512-JsXBU+kgQOAgzUn2jPrLA+Rd0Y1dswOlX3hp8MuRO1hQDs6xgHtbCXEiAu7bz5hyVURxbXcA2draasMbNqrhmg== dependencies: - "@typescript-eslint/scope-manager" "5.2.0" - "@typescript-eslint/types" "5.2.0" - "@typescript-eslint/typescript-estree" "5.2.0" + "@typescript-eslint/scope-manager" "5.5.0" + "@typescript-eslint/types" "5.5.0" + "@typescript-eslint/typescript-estree" "5.5.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.2.0.tgz#7ce8e4ab2baaa0ad5282913ea8e13ce03ec6a12a" - integrity sha512-RW+wowZqPzQw8MUFltfKYZfKXqA2qgyi6oi/31J1zfXJRpOn6tCaZtd9b5u9ubnDG2n/EMvQLeZrsLNPpaUiFQ== +"@typescript-eslint/scope-manager@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.5.0.tgz#2b9f3672fa6cddcb4160e7e8b49ef1fd00f83c09" + integrity sha512-0/r656RmRLo7CbN4Mdd+xZyPJ/fPCKhYdU6mnZx+8msAD8nJSP8EyCFkzbd6vNVZzZvWlMYrSNekqGrCBqFQhg== dependencies: - "@typescript-eslint/types" "5.2.0" - "@typescript-eslint/visitor-keys" "5.2.0" + "@typescript-eslint/types" "5.5.0" + "@typescript-eslint/visitor-keys" "5.5.0" -"@typescript-eslint/types@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.2.0.tgz#7ad32d15abddb0ee968a330f0ea182ea544ef7cf" - integrity sha512-cTk6x08qqosps6sPyP2j7NxyFPlCNsJwSDasqPNjEQ8JMD5xxj2NHxcLin5AJQ8pAVwpQ8BMI3bTxR0zxmK9qQ== +"@typescript-eslint/types@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.5.0.tgz#fee61ae510e84ed950a53937a2b443e078107003" + integrity sha512-OaYTqkW3GnuHxqsxxJ6KypIKd5Uw7bFiQJZRyNi1jbMJnK3Hc/DR4KwB6KJj6PBRkJJoaNwzMNv9vtTk87JhOg== -"@typescript-eslint/typescript-estree@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.2.0.tgz#c22e0ff6f8a4a3f78504a80ebd686fe2870a68ae" - integrity sha512-RsdXq2XmVgKbm9nLsE3mjNUM7BTr/K4DYR9WfFVMUuozHWtH5gMpiNZmtrMG8GR385EOSQ3kC9HiEMJWimxd/g== +"@typescript-eslint/typescript-estree@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.5.0.tgz#12f422698c1636bd0206086bbec9844c54625ebc" + integrity sha512-pVn8btYUiYrjonhMAO0yG8lm7RApzy2L4RC7Td/mC/qFkyf6vRbGyZozoA94+w6D2Y2GRqpMoCWcwx/EUOzyoQ== dependencies: - "@typescript-eslint/types" "5.2.0" - "@typescript-eslint/visitor-keys" "5.2.0" + "@typescript-eslint/types" "5.5.0" + "@typescript-eslint/visitor-keys" "5.5.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.2.0.tgz#03522d35df98474f08e0357171a7d1b259a88f55" - integrity sha512-Nk7HizaXWWCUBfLA/rPNKMzXzWS8Wg9qHMuGtT+v2/YpPij4nVXrVJc24N/r5WrrmqK31jCrZxeHqIgqRzs0Xg== +"@typescript-eslint/visitor-keys@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.5.0.tgz#4787586897b61f26068a3db5c50b3f5d254f9083" + integrity sha512-4GzJ1kRtsWzHhdM40tv0ZKHNSbkDhF0Woi/TDwVJX6UICwJItvP7ZTXbjTkCdrors7ww0sYe0t+cIKDAJwZ7Kw== dependencies: - "@typescript-eslint/types" "5.2.0" + "@typescript-eslint/types" "5.5.0" eslint-visitor-keys "^3.0.0" JSONStream@^1.0.4: @@ -2379,9 +1596,9 @@ acorn-jsx@^5.3.1: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" - integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^2.1.0, acorn@^2.4.0: version "2.7.0" @@ -2393,17 +1610,7 @@ acorn@^5.0.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^8.0.4: - version "8.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" - integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== - -acorn@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" - integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== - -acorn@^8.6.0: +acorn@^8.0.4, acorn@^8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.6.0.tgz#e3692ba0eb1a0c83eaa4f37f5fa7368dd7142895" integrity sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw== @@ -2434,17 +1641,17 @@ alce@1.2.0: esprima "^1.2.0" estraverse "^1.5.0" -alphanum-sort@^1.0.0: +alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= ansi-align@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" - integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: - string-width "^3.0.0" + string-width "^4.1.0" ansi-colors@^4.1.1: version "4.1.1" @@ -2478,11 +1685,6 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -2628,9 +1830,9 @@ arrify@^3.0.0: integrity sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw== asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: safer-buffer "~2.1.0" @@ -2665,15 +1867,15 @@ asyncro@^3.0.0: integrity sha512-nEnWYfrBmA3taTiuiOoZYmgJ/CNrSoQLeLs29SeLcPu60yaw/mHDBHV0iOZ051fTvsTHxpCY+gXibqT9wbQYfg== autoprefixer@^10.1.0: - version "10.3.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.1.tgz#954214821d3aa06692406c6a0a9e9d401eafbed2" - integrity sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A== + version "10.4.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.0.tgz#c3577eb32a1079a440ec253e404eaf1eb21388c8" + integrity sha512-7FdJ1ONtwzV1G43GDD0kpVMn/qbiNqyOPMFTX5nRffI+7vgWoFEc6DcXOxHJxrWNDXrZh18eDsZjvZGUljSRGA== dependencies: - browserslist "^4.16.6" - caniuse-lite "^1.0.30001243" - colorette "^1.2.2" + browserslist "^4.17.5" + caniuse-lite "^1.0.30001272" fraction.js "^4.1.1" normalize-range "^0.1.2" + picocolors "^1.0.0" postcss-value-parser "^4.1.0" ava@3.15.0: @@ -2824,15 +2026,6 @@ babel-plugin-macros@^3.0.1: cosmiconfig "^7.0.0" resolve "^1.19.0" -babel-plugin-polyfill-corejs2@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" - integrity sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ== - dependencies: - "@babel/compat-data" "^7.13.11" - "@babel/helper-define-polyfill-provider" "^0.2.2" - semver "^6.1.1" - babel-plugin-polyfill-corejs2@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz#407082d0d355ba565af24126fb6cb8e9115251fd" @@ -2842,14 +2035,6 @@ babel-plugin-polyfill-corejs2@^0.3.0: "@babel/helper-define-polyfill-provider" "^0.3.0" semver "^6.1.1" -babel-plugin-polyfill-corejs3@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz#68cb81316b0e8d9d721a92e0009ec6ecd4cd2ca9" - integrity sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" - core-js-compat "^3.14.0" - babel-plugin-polyfill-corejs3@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz#0b571f4cf3d67f911512f5c04842a7b8e8263087" @@ -2858,13 +2043,6 @@ babel-plugin-polyfill-corejs3@^0.4.0: "@babel/helper-define-polyfill-provider" "^0.3.0" core-js-compat "^3.18.0" -babel-plugin-polyfill-regenerator@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz#b310c8d642acada348c1fa3b3e6ce0e851bee077" - integrity sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" - babel-plugin-polyfill-regenerator@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz#9ebbcd7186e1a33e21c5e20cae4e7983949533be" @@ -2873,9 +2051,9 @@ babel-plugin-polyfill-regenerator@^0.3.0: "@babel/helper-define-polyfill-provider" "^0.3.0" babel-plugin-transform-async-to-promises@^0.8.15: - version "0.8.15" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.15.tgz#13b6d8ef13676b4e3c576d3600b85344bb1ba346" - integrity sha512-fDXP68ZqcinZO2WCiimCL9zhGjGXOnn3D33zvbh+yheZ/qOrNVVDDIBtAaM3Faz8TRvQzHiRKsu3hfrBAhEncQ== + version "0.8.16" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.16.tgz#e7392100cd44f6a56d043c7efd383ffbee1c44a9" + integrity sha512-mm0UMekJVOTuIlkGIEH1fpnExyTIIJ2/L5ixTTI1zAVdMpbG7Em3LiS92p0TCWKiMkHhYYinz/zn2D/BPPJaxA== babel-plugin-transform-remove-console@6.9.4: version "6.9.4" @@ -2986,9 +2164,9 @@ bl@^4.1.0: readable-stream "^3.4.0" blueimp-md5@^2.10.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.18.0.tgz#1152be1335f0c6b3911ed9e36db54f3e6ac52935" - integrity sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q== + version "2.19.0" + resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0" + integrity sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w== boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" @@ -2996,15 +2174,15 @@ boolbase@^1.0.0, boolbase@~1.0.0: integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= boxen@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b" - integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA== + version "5.1.2" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== dependencies: ansi-align "^3.0.0" camelcase "^6.2.0" chalk "^4.1.0" cli-boxes "^2.2.1" - string-width "^4.2.0" + string-width "^4.2.2" type-fest "^0.20.2" widest-line "^3.1.0" wrap-ansi "^7.0.0" @@ -3031,29 +2209,7 @@ brotli-size@^4.0.0: dependencies: duplexer "0.1.1" -browserslist@^4.0.0, browserslist@^4.16.6: - version "4.16.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335" - integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA== - dependencies: - caniuse-lite "^1.0.30001248" - colorette "^1.2.2" - electron-to-chromium "^1.3.793" - escalade "^3.1.1" - node-releases "^1.1.73" - -browserslist@^4.17.5: - version "4.17.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.5.tgz#c827bbe172a4c22b123f5e337533ceebadfdd559" - integrity sha512-I3ekeB92mmpctWBoLXe0d5wPS2cBuRvvW0JyyJHMrk9/HmP2ZjrTboNAZ8iuGqaEIlKguljbQY32OkOJIRrgoA== - dependencies: - caniuse-lite "^1.0.30001271" - electron-to-chromium "^1.3.878" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" - -browserslist@^4.17.6: +browserslist@^4.0.0, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.17.5, browserslist@^4.18.1: version "4.18.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.18.1.tgz#60d3920f25b6860eb917c6c7b185576f4d8b017f" integrity sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ== @@ -3162,25 +2318,6 @@ call-signature@0.0.2: resolved "https://registry.yarnpkg.com/call-signature/-/call-signature-0.0.2.tgz#a84abc825a55ef4cb2b028bd74e205a65b9a4996" integrity sha1-qEq8glpV70yysCi9dOIFpluaSZY= -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -3196,9 +2333,9 @@ camelcase-keys@^6.2.2: quick-lru "^4.0.1" camelcase-keys@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.0.tgz#40fcbe171f7432888369d0c871df7cfa5ce4f788" - integrity sha512-qlQlECgDl5Ev+gkvONaiD4X4TF2gyZKuLBvzx0zLo2UwAxmz3hJP/841aaMHTeH1T7v5HRwoRq91daulXoYWvg== + version "7.0.1" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-7.0.1.tgz#5a57e6dfb3f6c7929dad15599ee4476a7e9a3b2d" + integrity sha512-P331lEls98pW8JLyodNWfzuz91BEDVA4VpW2/SwXnyv2K495tq1N777xzDbFgnEigfA7UIY0xa6PwR/H9jijjA== dependencies: camelcase "^6.2.0" map-obj "^4.1.0" @@ -3211,9 +2348,9 @@ camelcase@^5.3.1: integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + version "6.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.1.tgz#250fd350cfd555d0d2160b1d51510eaf8326e86e" + integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== caniuse-api@^3.0.0: version "3.0.0" @@ -3225,20 +2362,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001243, caniuse-lite@^1.0.30001248: - version "1.0.30001249" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz#90a330057f8ff75bfe97a94d047d5e14fabb2ee8" - integrity sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw== - -caniuse-lite@^1.0.30001271: - version "1.0.30001272" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001272.tgz#8e9790ff995e9eb6e1f4c45cd07ddaa87cddbb14" - integrity sha512-DV1j9Oot5dydyH1v28g25KoVm7l8MTxazwuiH3utWiAS6iL/9Nh//TGwqFEeqqN8nnWYQ8HHhUq+o4QPt9kvYw== - -caniuse-lite@^1.0.30001280: - version "1.0.30001280" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001280.tgz#066a506046ba4be34cde5f74a08db7a396718fb7" - integrity sha512-kFXwYvHe5rix25uwueBxC569o53J6TpnGu0BEEn+6Lhl2vsnAumRFWEBhDft1fwyo6m1r4i+RqA4+163FpeFcA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001272, caniuse-lite@^1.0.30001280: + version "1.0.30001283" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz#8573685bdae4d733ef18f78d44ba0ca5fe9e896b" + integrity sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg== caseless@~0.12.0: version "0.12.0" @@ -3359,9 +2486,9 @@ ci-info@^2.0.0: integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== ci-info@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" - integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== + version "3.3.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" + integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== ci-parallel-vars@^1.0.1: version "1.0.1" @@ -3405,9 +2532,9 @@ cli-cursor@^3.1.0: restore-cursor "^3.1.0" cli-spinners@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939" - integrity sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q== + version "2.6.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== cli-truncate@^0.2.1: version "0.2.1" @@ -3473,20 +2600,6 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - code-excerpt@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-3.0.0.tgz#fcfb6748c03dba8431c19f5474747fad3f250f10" @@ -3499,7 +2612,7 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -color-convert@^1.9.0, color-convert@^1.9.3: +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== @@ -3528,31 +2641,15 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0, color-name@~1.1.4: +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== -color-string@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312" - integrity sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" - integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== - dependencies: - color-convert "^1.9.3" - color-string "^1.6.0" - -colorette@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" - integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== +colord@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.1.tgz#c961ea0efeb57c9f0f4834458f26cb9cc4a3f90e" + integrity sha512-4LBMSt09vR0uLnPVkOUBnmxgoaeN4ewRbx801wY/bXcltXfpR/G46OdWn96XpYmCWuYvO46aBZP4NgX8HpNAcw== colorette@^2.0.16: version "2.0.16" @@ -3571,6 +2668,11 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" @@ -3638,17 +2740,17 @@ confusing-browser-globals@1.0.10: integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== conventional-changelog-angular@^5.0.11: - version "5.0.12" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" - integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== + version "5.0.13" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" + integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== dependencies: compare-func "^2.0.0" q "^1.5.1" conventional-commits-parser@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz#190fb9900c6e02be0c0bca9b03d57e24982639fd" - integrity sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g== + version "3.2.3" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.3.tgz#fc43704698239451e3ef35fd1d8ed644f46bd86e" + integrity sha512-YyRDR7On9H07ICFpRm/igcdjIqebXbvf4Cff+Pf0BrBys1i1EOzx9iFXNlAbdrLAR8jf7bkUYkDAr8pEy0q4Pw== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.1" @@ -3669,28 +2771,12 @@ convert-to-spaces@^1.0.1: resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz#7e3e48bbe6d997b1417ddca2868204b4d3d85715" integrity sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU= -core-js-compat@^3.14.0, core-js-compat@^3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.0.tgz#fced4a0a534e7e02f7e084bff66c701f8281805f" - integrity sha512-5D9sPHCdewoUK7pSUPfTF7ZhLh8k9/CoJXWUEo+F1dZT5Z1DVgcuRqUKhjeKW+YLb8f21rTFgWwQJiNw1hoZ5Q== - dependencies: - browserslist "^4.16.6" - semver "7.0.0" - -core-js-compat@^3.18.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.19.0.tgz#b3b93f93c8721b3ed52b91f12f964cc410967f8b" - integrity sha512-R09rKZ56ccGBebjTLZHvzDxhz93YPT37gBm6qUhnwj3Kt7aCjjZWD1injyNbyeFHxNKfeZBSyds6O9n3MKq1sw== - dependencies: - browserslist "^4.17.5" - semver "7.0.0" - -core-js-compat@^3.19.1: - version "3.19.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.19.1.tgz#fe598f1a9bf37310d77c3813968e9f7c7bb99476" - integrity sha512-Q/VJ7jAF/y68+aUsQJ/afPOewdsGkDtcMb40J8MbuWKlK3Y+wtHq8bTHKPj2WKWLIqmS5JhHs4CzHtz6pT2W6g== +core-js-compat@^3.18.0, core-js-compat@^3.19.1: + version "3.19.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.19.2.tgz#18066a3404a302433cb0aa8be82dd3d75c76e5c4" + integrity sha512-ObBY1W5vx/LFFMaL1P5Udo4Npib6fu+cMokeziWkA8Tns4FcDemKF5j9JvaI5JhdkW8EQJQGJN1EcrzmEwuAqQ== dependencies: - browserslist "^4.17.6" + browserslist "^4.18.1" semver "7.0.0" core-js@^2.0.0, core-js@^2.4.0: @@ -3698,33 +2784,17 @@ core-js@^2.0.0, core-js@^2.4.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -core-util-is@1.0.2, core-util-is@~1.0.0: +core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig@^7.0.1: +cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== @@ -3754,33 +2824,23 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -css-color-names@0.0.4, css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= - -css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== +css-declaration-sorter@^6.0.3: + version "6.1.3" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.1.3.tgz#e9852e4cf940ba79f509d9425b137d1f94438dc2" + integrity sha512-SvjQjNRZgh4ULK1LDJ2AduPKUKxIqmtU7ZAyi47BTV+M90Qvxr9AB6lKlLbDUfXqI9IQeYA8LbAsCZPpJEV3aA== dependencies: - postcss "^7.0.1" timsort "^0.3.0" -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== +css-select@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== dependencies: boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" + css-what "^5.0.0" + domhandler "^4.2.0" + domutils "^2.6.0" + nth-check "^2.0.0" css-select@~1.2.0: version "1.2.0" @@ -3792,15 +2852,7 @@ css-select@~1.2.0: domutils "1.5.1" nth-check "~1.0.1" -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - -css-tree@^1.1.2: +css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== @@ -3813,85 +2865,67 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== +css-what@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" + integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-default@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" - integrity sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ== - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.3" - postcss-unique-selectors "^4.0.1" - -cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= - -cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" - integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= - -cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - dependencies: - postcss "^7.0.0" - -cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== +cssnano-preset-default@^5.1.8: + version "5.1.8" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.8.tgz#7525feb1b72f7b06e57f55064cbdae341d79dea2" + integrity sha512-zWMlP0+AMPBVE852SqTrP0DnhTcTA2C1wAF92TKZ3Va+aUVqLIhkqKlnJIXXdqXD7RN+S1ujuWmNpvrJBiM/vg== + dependencies: + css-declaration-sorter "^6.0.3" + cssnano-utils "^2.0.1" + postcss-calc "^8.0.0" + postcss-colormin "^5.2.1" + postcss-convert-values "^5.0.2" + postcss-discard-comments "^5.0.1" + postcss-discard-duplicates "^5.0.1" + postcss-discard-empty "^5.0.1" + postcss-discard-overridden "^5.0.1" + postcss-merge-longhand "^5.0.4" + postcss-merge-rules "^5.0.3" + postcss-minify-font-values "^5.0.1" + postcss-minify-gradients "^5.0.3" + postcss-minify-params "^5.0.2" + postcss-minify-selectors "^5.1.0" + postcss-normalize-charset "^5.0.1" + postcss-normalize-display-values "^5.0.1" + postcss-normalize-positions "^5.0.1" + postcss-normalize-repeat-style "^5.0.1" + postcss-normalize-string "^5.0.1" + postcss-normalize-timing-functions "^5.0.1" + postcss-normalize-unicode "^5.0.1" + postcss-normalize-url "^5.0.3" + postcss-normalize-whitespace "^5.0.1" + postcss-ordered-values "^5.0.2" + postcss-reduce-initial "^5.0.2" + postcss-reduce-transforms "^5.0.1" + postcss-svgo "^5.0.3" + postcss-unique-selectors "^5.0.2" + +cssnano-utils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2" + integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== -cssnano@^4.1.10: - version "4.1.11" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.11.tgz#c7b5f5b81da269cb1fd982cb960c1200910c9a99" - integrity sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g== +cssnano@^5.0.1: + version "5.0.12" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.12.tgz#2c083a1c786fc9dc2d5522bd3c0e331b7cd302ab" + integrity sha512-U38V4x2iJ3ijPdeWqUrEr4eKBB5PbEKsNP5T8xcik2Au3LeMtiMHX0i2Hu9k51FcKofNZumbrcdC6+a521IUHg== dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.8" - is-resolvable "^1.0.0" - postcss "^7.0.0" + cssnano-preset-default "^5.1.8" + is-resolvable "^1.1.0" + lilconfig "^2.0.3" + yaml "^1.10.2" -csso@^4.0.2: +csso@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== @@ -3956,9 +2990,9 @@ debug@^3.2.7: ms "^2.1.1" debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -3976,9 +3010,9 @@ decamelize@^1.1.0: integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decamelize@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.0.tgz#88358157b010ef133febfd27c18994bd80c6215b" - integrity sha512-U75DcT5hrio3KNtvdULAWnLiAPbFUC4191ldxMmj4FA/mRuBnmDwU0boNfPyFRhnan+Jm+haLeSn3P0afcBn4w== + version "5.0.1" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.1.tgz#db11a92e58c741ef339fb0a2868d8a06a9a7b1e9" + integrity sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA== decompress-response@^3.3.0: version "3.3.0" @@ -4012,9 +3046,9 @@ deep-extend@^0.6.0: integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: version "4.2.2" @@ -4139,6 +3173,15 @@ dom-serializer@0: domelementtype "^2.0.1" entities "^2.0.0" +dom-serializer@^1.0.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + dom-serializer@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" @@ -4152,7 +3195,7 @@ domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== -domelementtype@^2.0.1: +domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== @@ -4171,6 +3214,13 @@ domhandler@^2.3.0: dependencies: domelementtype "1" +domhandler@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f" + integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w== + dependencies: + domelementtype "^2.2.0" + domutils@1.5, domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -4179,7 +3229,7 @@ domutils@1.5, domutils@1.5.1: dom-serializer "0" domelementtype "1" -domutils@^1.5.1, domutils@^1.7.0: +domutils@^1.5.1: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== @@ -4187,6 +3237,15 @@ domutils@^1.5.1, domutils@^1.7.0: dom-serializer "0" domelementtype "1" +domutils@^2.6.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.1.0, dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -4236,20 +3295,10 @@ ejs@^3.1.6: dependencies: jake "^10.6.1" -electron-to-chromium@^1.3.793: - version "1.3.796" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.796.tgz#bd74a4367902c9d432d129f265bf4542cddd9f54" - integrity sha512-agwJFgM0FUC1UPPbQ4aII3HamaaJ09fqWGAWYHmzxDWqdmTleCHyyA0kt3fJlTd5M440IaeuBfzXzXzCotnZcQ== - -electron-to-chromium@^1.3.878: - version "1.3.885" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.885.tgz#c8cec32fbc61364127849ae00f2395a1bae7c454" - integrity sha512-JXKFJcVWrdHa09n4CNZYfYaK6EW5aAew7/wr3L1OnsD1L+JHL+RCtd7QgIsxUbFPeTwPlvnpqNNTOLkoefmtXg== - electron-to-chromium@^1.3.896: - version "1.3.899" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.899.tgz#4d7d040e73def3d5f5bd6b8a21049025dce6fce0" - integrity sha512-w16Dtd2zl7VZ4N4Db+FIa7n36sgPGCKjrKvUUmp5ialsikvcQLjcJR9RWnlYNxIyEHLdHaoIZEqKsPxU9MdyBg== + version "1.4.5" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.5.tgz#912e8fd1645edee2f0f212558f40916eb538b1f9" + integrity sha512-YKaB+t8ul5crdh6OeqT2qXdxJGI0fAYb6/X8pDIyye+c3a7ndOCk5gVeKX+ABwivCGNS56vOAif3TN0qJMpEHw== elegant-spinner@^1.0.1: version "1.0.1" @@ -4261,11 +3310,6 @@ emittery@^0.8.0: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== -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== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -4359,29 +3403,6 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: - version "1.18.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" - integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.3" - is-negative-zero "^2.0.1" - is-regex "^1.1.3" - is-string "^1.0.6" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -4587,9 +3608,9 @@ eslint-config-prettier@^8.3.0: integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== eslint-config-xo-typescript@*: - version "0.47.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.47.0.tgz#8c057c3c028f9d52688e0859f2424d4ac489a33b" - integrity sha512-kLmflP/zK9vACAVCIc8RGmALSVKniogelscF0Hi3iyXaZoERekveVPaM5N6PxfHgvW7ovBdcbd1QfX7cQCA6Ew== + version "0.47.1" + resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.47.1.tgz#87b5865d8a3428fa26cc8dc3146ef4f712dfed46" + integrity sha512-BkbzIltZCWp8QLekKJKG8zJ/ZGezD8Z9FaJ+hJ5PrAVUGkIPmxXLLEHCKS3ax7oOqZLYQiG+jyKfQDIEdTQgbg== eslint-config-xo@^0.39.0: version "0.39.0" @@ -4801,12 +3822,7 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186" - integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== - -eslint-visitor-keys@^3.1.0: +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== @@ -4870,16 +3886,7 @@ espower-location-detector@^1.0.0: source-map "^0.5.0" xtend "^4.0.0" -espree@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.0.0.tgz#e90a2965698228502e771c7a58489b1a9d107090" - integrity sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ== - dependencies: - acorn "^8.5.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^3.0.0" - -espree@^9.1.0: +espree@^9.0.0, espree@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/espree/-/espree-9.1.0.tgz#ba9d3c9b34eeae205724124e31de4543d59fbf74" integrity sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ== @@ -4935,9 +3942,9 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== estree-walker@^0.6.1: version "0.6.1" @@ -5004,9 +4011,9 @@ extsprintf@1.3.0: integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" @@ -5040,9 +4047,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.1.tgz#5d8175aae17db61947f8b162cfc7f63264d22807" - integrity sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw== + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" @@ -5103,16 +4110,7 @@ find-cache-dir@^2.0.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" - integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-cache-dir@^3.3.2: +find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== @@ -5190,9 +4188,9 @@ flat-cache@^3.0.4: rimraf "^3.0.2" flatted@^3.1.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" - integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== + version "3.2.4" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2" + integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== foreground-child@^2.0.0: version "2.0.0" @@ -5217,9 +4215,9 @@ form-data@~2.3.2: mime-types "^2.1.12" fraction.js@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.1.tgz#ac4e520473dae67012d618aab91eda09bcb400ff" - integrity sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.2.tgz#13e420a92422b6cf244dff8690ed89401029fbe8" + integrity sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA== fromentries@^1.3.2: version "1.3.2" @@ -5388,9 +4386,9 @@ glob-parent@^6.0.1: is-glob "^4.0.3" glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -5426,9 +4424,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.6.0, globals@^13.9.0: - version "13.10.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" - integrity sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g== + version "13.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.0.tgz#4d733760304230a0082ed96e21e5c565f898089e" + integrity sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg== dependencies: type-fest "^0.20.2" @@ -5510,9 +4508,9 @@ got@^9.6.0: url-parse-lax "^3.0.0" graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== gzip-size@^3.0.0: version "3.0.0" @@ -5585,18 +4583,13 @@ has-yarn@^2.1.0: resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== -has@^1.0.0, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" -hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -5616,16 +4609,6 @@ hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -5726,9 +4709,9 @@ ignore@^4.0.6: integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + version "5.1.9" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb" + integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== import-cwd@^3.0.0: version "3.0.0" @@ -5737,14 +4720,6 @@ import-cwd@^3.0.0: dependencies: import-from "^3.0.0" -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -5766,9 +4741,9 @@ import-lazy@^2.1.0: integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + version "3.0.3" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" + integrity sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -5798,11 +4773,6 @@ indent-string@^5.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -5909,10 +4879,10 @@ irregular-plurals@^3.2.0: resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-3.3.0.tgz#67d0715d4361a60d9fd9ee80af3881c631a31ee2" integrity sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g== -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= +is-absolute-url@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" + integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== is-absolute@^1.0.0: version "1.0.0" @@ -5923,26 +4893,24 @@ is-absolute@^1.0.0: is-windows "^1.0.1" is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" is-binary-path@~2.1.0: version "2.1.0" @@ -5952,11 +4920,12 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-builtin-module@^3.1.0: version "3.1.0" @@ -5965,12 +4934,7 @@ is-builtin-module@^3.1.0: dependencies: builtin-modules "^3.0.0" -is-callable@^1.1.4, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== - -is-callable@^1.2.4: +is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== @@ -5980,28 +4944,9 @@ is-ci@^2.0.0: resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== dependencies: - ci-info "^2.0.0" - -is-color-stop@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - -is-core-module@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" - integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== - dependencies: - has "^1.0.3" + ci-info "^2.0.0" -is-core-module@^2.7.0, is-core-module@^2.8.0: +is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.7.0, is-core-module@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== @@ -6009,14 +4954,11 @@ is-core-module@^2.7.0, is-core-module@^2.8.0: has "^1.0.3" is-date-object@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" @@ -6068,14 +5010,7 @@ is-get-set-prop@^1.0.0: get-set-props "^0.1.0" lowercase-keys "^1.0.0" -is-glob@^4.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-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -6131,9 +5066,11 @@ is-npm@^5.0.0: integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" is-number@^7.0.0: version "7.0.0" @@ -6212,15 +5149,7 @@ is-reference@^1.2.1: dependencies: "@types/estree" "*" -is-regex@^1.0.4, is-regex@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.2" - -is-regex@^1.1.4: +is-regex@^1.0.4, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -6235,7 +5164,7 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-resolvable@^1.0.0: +is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== @@ -6262,12 +5191,7 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-string@^1.0.5, is-string@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== - -is-string@^1.0.7: +is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== @@ -6364,15 +5288,10 @@ issue-regex@^3.1.0: resolved "https://registry.yarnpkg.com/issue-regex/-/issue-regex-3.1.0.tgz#0671f094d6449c5b712fac3c9562aecb727d709e" integrity sha512-0RHjbtw9QXeSYnIEY5Yrp2QZrdtz21xBDV9C/GIlY2POmgoS6a7qjkYS5siRKXScnuAj5/SPv1C3YForNCHTJA== -istanbul-lib-coverage@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" - integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== - -istanbul-lib-coverage@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.1.tgz#e8900b3ed6069759229cf30f7067388d148aeb5e" - integrity sha512-GvCYYTxaCPqwMjobtVcVKvSHtAGe48MNhGjpK8LtVF8K0ISX7hCKl85LgtuaSneWVyQmaGcW3iXVV3GaZSLpmQ== +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== istanbul-lib-report@^3.0.0: version "3.0.0" @@ -6384,9 +5303,9 @@ istanbul-lib-report@^3.0.0: supports-color "^7.1.0" istanbul-reports@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" - integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== + version "3.0.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.5.tgz#a2580107e71279ea6d661ddede929ffc6d693384" + integrity sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -6430,7 +5349,7 @@ js-types@^1.0.0: resolved "https://registry.yarnpkg.com/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03" integrity sha1-0kLmSU7Vcq08koCfyL7X92h8vwM= -js-yaml@^3.13.1, js-yaml@^3.14.0: +js-yaml@^3.14.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6511,10 +5430,10 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" @@ -6569,13 +5488,13 @@ jsonparse@^1.2.0: integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" extsprintf "1.3.0" - json-schema "0.2.3" + json-schema "0.4.0" verror "1.10.0" keyv@^3.0.0: @@ -6586,9 +5505,9 @@ keyv@^3.0.0: json-buffer "3.0.0" keyv@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" - integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== + version "4.0.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.4.tgz#f040b236ea2b06ed15ed86fbef8407e1a1c8e376" + integrity sha512-vqNHbAc8BBsxk+7QBYLW0Y219rWcClspR6WSeoHYKG5mnsSoOH+BL1pWq02DDCVdvvuUny5rkBlzMRzoqc+GIg== dependencies: json-buffer "3.0.1" @@ -6632,16 +5551,11 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lilconfig@2.0.4: +lilconfig@2.0.4, lilconfig@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== -lilconfig@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd" - integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg== - line-column-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/line-column-path/-/line-column-path-3.0.0.tgz#c873b42feb57f5f97bc72af30d21581076b3119e" @@ -6650,9 +5564,9 @@ line-column-path@^3.0.0: type-fest "^2.0.0" lines-and-columns@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" - integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@12.1.2: version "12.1.2" @@ -6714,15 +5628,15 @@ listr-verbose-renderer@^0.5.0: figures "^2.0.0" listr2@^3.13.3: - version "3.13.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.3.tgz#d8f6095c9371b382c9b1c2bc33c5941d8e177f11" - integrity sha512-VqAgN+XVfyaEjSaFewGPcDs5/3hBbWVaX1VgWv2f52MF7US45JuARlArULctiB44IIcEk3JF7GtoFCLqEdeuPA== + version "3.13.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.5.tgz#105a813f2eb2329c4aae27373a281d610ee4985f" + integrity sha512-3n8heFQDSk+NcwBn3CgxEibZGaRzx+pC64n3YjpMD1qguV4nWus3Al+Oo3KooqFKTQEJ1v7MmnbnyyNspgx3NA== dependencies: cli-truncate "^2.1.0" - clone "^2.1.2" colorette "^2.0.16" log-update "^4.0.0" p-map "^4.0.0" + rfdc "^1.3.0" rxjs "^7.4.0" through "^2.3.8" wrap-ansi "^7.0.0" @@ -7002,9 +5916,9 @@ map-obj@^1.0.0: integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^4.0.0, map-obj@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" - integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== marked@0.3.19: version "0.3.19" @@ -7040,19 +5954,6 @@ mdn-data@2.0.14: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - -mem@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/mem/-/mem-6.1.1.tgz#ea110c2ebc079eca3022e6b08c85a795e77f6318" - integrity sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^3.0.0" - mem@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/mem/-/mem-8.1.1.tgz#cf118b357c65ab7b7e0817bdf00c8062297c0122" @@ -7179,17 +6080,17 @@ microtime@3.0.0: node-addon-api "^1.2.0" node-gyp-build "^3.8.0" -mime-db@1.49.0: - version "1.49.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" - integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.32" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" - integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== dependencies: - mime-db "1.49.0" + mime-db "1.51.0" mimic-fn@^1.0.0: version "1.2.0" @@ -7247,17 +6148,10 @@ minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -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" - mri@^1.1.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6" - integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== ms@2.0.0: version "2.0.0" @@ -7289,10 +6183,10 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nanoid@^3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== +nanoid@^3.1.30: + version "3.1.30" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" + integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== natural-compare@^1.4.0: version "1.4.0" @@ -7321,11 +6215,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-releases@^1.1.73: - version "1.1.73" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" - integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== - node-releases@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" @@ -7342,12 +6231,12 @@ normalize-package-data@^2.5.0: validate-npm-package-license "^3.0.1" normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.2.tgz#cae5c410ae2434f9a6c1baa65d5bc3b9366c8699" - integrity sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== dependencies: hosted-git-info "^4.0.1" - resolve "^1.20.0" + is-core-module "^2.5.0" semver "^7.3.4" validate-npm-package-license "^3.0.1" @@ -7361,11 +6250,6 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - normalize-url@^4.1.0: version "4.5.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" @@ -7443,7 +6327,14 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -nth-check@^1.0.2, nth-check@~1.0.1: +nth-check@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" + integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== + dependencies: + boolbase "^1.0.0" + +nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== @@ -7503,24 +6394,6 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" - integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - -object.values@^1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" - integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" - object.values@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" @@ -7673,7 +6546,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -7749,12 +6622,13 @@ p-map@^4.0.0: aggregate-error "^3.0.0" p-memoize@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/p-memoize/-/p-memoize-4.0.1.tgz#6f4231857fec10de2504611fe820c808fa8c5f8b" - integrity sha512-km0sP12uE0dOZ5qP+s7kGVf07QngxyG0gS8sYFvFWhqlgzOsSy+m71aUejf/0akxj5W7gE//2G74qTv6b4iMog== + version "4.0.3" + resolved "https://registry.yarnpkg.com/p-memoize/-/p-memoize-4.0.3.tgz#9f3b9965f1fd79dadc2e6ec957c1b43c410a6f99" + integrity sha512-lX9GfP1NT5jheKsmvc1071L74/Vw7vul+uZEnst7LNuMtbKlWYwKItqcLSAVUyJnrfQAqFFCJQ5bt0whrDsWQA== dependencies: - mem "^6.0.1" + map-age-cleaner "^0.1.3" mimic-fn "^3.0.0" + p-settle "^4.1.1" p-queue@^6.6.2: version "6.6.2" @@ -7764,6 +6638,19 @@ p-queue@^6.6.2: eventemitter3 "^4.0.4" p-timeout "^3.2.0" +p-reflect@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-reflect/-/p-reflect-2.1.0.tgz#5d67c7b3c577c4e780b9451fc9129675bd99fe67" + integrity sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg== + +p-settle@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/p-settle/-/p-settle-4.1.1.tgz#37fbceb2b02c9efc28658fc8d36949922266035f" + integrity sha512-6THGh13mt3gypcNMm0ADqVNCcYa3BK6DWsuJWFCuEKP1rpY+OKGp7gaZwVmLspmic01+fsg/fN57MfvDzZ/PuQ== + dependencies: + p-limit "^2.2.2" + p-reflect "^2.1.0" + p-timeout@^3.1.0, p-timeout@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -7965,61 +6852,50 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== -postcss-calc@^7.0.1: - version "7.0.5" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" - integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== +postcss-calc@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a" + integrity sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g== dependencies: - postcss "^7.0.27" postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.2" -postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== +postcss-colormin@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.2.1.tgz#6e444a806fd3c578827dbad022762df19334414d" + integrity sha512-VVwMrEYLcHYePUYV99Ymuoi7WhKrMGy/V9/kTS0DkCoJYmmjdOMneyhzYUxcNgteKDVbrewOkSM7Wje/MFwxzA== dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + browserslist "^4.16.6" + caniuse-api "^3.0.0" + colord "^2.9.1" + postcss-value-parser "^4.1.0" -postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== +postcss-convert-values@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.2.tgz#879b849dc3677c7d6bc94b6a2c1a3f0808798059" + integrity sha512-KQ04E2yadmfa1LqXm7UIDwW1ftxU/QWZmz6NKnHnUvJ3LEYbbcX6i329f/ig+WnEByHegulocXrECaZGLpL8Zg== dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + postcss-value-parser "^4.1.0" -postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - dependencies: - postcss "^7.0.0" +postcss-discard-comments@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz#9eae4b747cf760d31f2447c27f0619d5718901fe" + integrity sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg== -postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - dependencies: - postcss "^7.0.0" +postcss-discard-duplicates@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz#68f7cc6458fe6bab2e46c9f55ae52869f680e66d" + integrity sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA== -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" +postcss-discard-empty@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz#ee136c39e27d5d2ed4da0ee5ed02bc8a9f8bf6d8" + integrity sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw== -postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - dependencies: - postcss "^7.0.0" +postcss-discard-overridden@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz#454b41f707300b98109a75005ca4ab0ff2743ac6" + integrity sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q== postcss-load-config@^3.0.0: version "3.1.0" @@ -8030,67 +6906,57 @@ postcss-load-config@^3.0.0: lilconfig "^2.0.3" yaml "^1.10.2" -postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== +postcss-merge-longhand@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.4.tgz#41f4f3270282ea1a145ece078b7679f0cef21c32" + integrity sha512-2lZrOVD+d81aoYkZDpWu6+3dTAAGkCKbV5DoRhnIR7KOULVrI/R7bcMjhrH9KTRy6iiHKqmtG+n/MMj1WmqHFw== dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" + postcss-value-parser "^4.1.0" + stylehacks "^5.0.1" -postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== +postcss-merge-rules@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.3.tgz#b5cae31f53129812a77e3eb1eeee448f8cf1a1db" + integrity sha512-cEKTMEbWazVa5NXd8deLdCnXl+6cYG7m2am+1HzqH0EnTdy8fRysatkaXb2dEnR+fdaDxTvuZ5zoBdv6efF6hg== dependencies: - browserslist "^4.0.0" + browserslist "^4.16.6" caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" + cssnano-utils "^2.0.1" + postcss-selector-parser "^6.0.5" -postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== +postcss-minify-font-values@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz#a90cefbfdaa075bd3dbaa1b33588bb4dc268addf" + integrity sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA== dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + postcss-value-parser "^4.1.0" -postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== +postcss-minify-gradients@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.3.tgz#f970a11cc71e08e9095e78ec3a6b34b91c19550e" + integrity sha512-Z91Ol22nB6XJW+5oe31+YxRsYooxOdFKcbOqY/V8Fxse1Y3vqlNRpi1cxCqoACZTQEhl+xvt4hsbWiV5R+XI9Q== dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + colord "^2.9.1" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== +postcss-minify-params@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.2.tgz#1b644da903473fbbb18fbe07b8e239883684b85c" + integrity sha512-qJAPuBzxO1yhLad7h2Dzk/F7n1vPyfHfCCh5grjGfjhi1ttCnq4ZXGIW77GSrEbh9Hus9Lc/e/+tB4vh3/GpDg== dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" + alphanum-sort "^1.0.2" + browserslist "^4.16.6" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== +postcss-minify-selectors@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz#4385c845d3979ff160291774523ffa54eafd5a54" + integrity sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og== dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" + alphanum-sort "^1.0.2" + postcss-selector-parser "^6.0.5" postcss-modules-extract-imports@^3.0.0: version "3.0.0" @@ -8134,126 +7000,98 @@ postcss-modules@^4.0.0: postcss-modules-values "^4.0.0" string-hash "^1.1.1" -postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - dependencies: - postcss "^7.0.0" +postcss-normalize-charset@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz#121559d1bebc55ac8d24af37f67bd4da9efd91d0" + integrity sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg== -postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== +postcss-normalize-display-values@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz#62650b965981a955dffee83363453db82f6ad1fd" + integrity sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ== dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== +postcss-normalize-positions@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz#868f6af1795fdfa86fbbe960dceb47e5f9492fe5" + integrity sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg== dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + postcss-value-parser "^4.1.0" -postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== +postcss-normalize-repeat-style@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz#cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5" + integrity sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w== dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== +postcss-normalize-string@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz#d9eafaa4df78c7a3b973ae346ef0e47c554985b0" + integrity sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA== dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + postcss-value-parser "^4.1.0" -postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== +postcss-normalize-timing-functions@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz#8ee41103b9130429c6cbba736932b75c5e2cb08c" + integrity sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q== dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== +postcss-normalize-unicode@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz#82d672d648a411814aa5bf3ae565379ccd9f5e37" + integrity sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA== dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + browserslist "^4.16.0" + postcss-value-parser "^4.1.0" -postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== +postcss-normalize-url@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.3.tgz#42eca6ede57fe69075fab0f88ac8e48916ef931c" + integrity sha512-qWiUMbvkRx3kc1Dp5opzUwc7MBWZcSDK2yofCmdvFBCpx+zFPkxBC1FASQ59Pt+flYfj/nTZSkmF56+XG5elSg== dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + is-absolute-url "^3.0.3" + normalize-url "^6.0.1" + postcss-value-parser "^4.1.0" -postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== +postcss-normalize-whitespace@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz#b0b40b5bcac83585ff07ead2daf2dcfbeeef8e9a" + integrity sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA== dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + postcss-value-parser "^4.1.0" -postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== +postcss-ordered-values@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044" + integrity sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ== dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== +postcss-reduce-initial@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.2.tgz#fa424ce8aa88a89bc0b6d0f94871b24abe94c048" + integrity sha512-v/kbAAQ+S1V5v9TJvbGkV98V2ERPdU6XvMcKMjqAlYiJ2NtsHGlKYLPjWWcXlaTKNxooId7BGxeraK8qXvzKtw== dependencies: - browserslist "^4.0.0" + browserslist "^4.16.6" caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - -postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" -postcss-selector-parser@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== +postcss-reduce-transforms@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz#93c12f6a159474aa711d5269923e2383cedcf640" + integrity sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA== dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" + cssnano-utils "^2.0.1" + postcss-value-parser "^4.1.0" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: +postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5: version "6.0.6" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg== @@ -8261,51 +7099,35 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-svgo@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" - integrity sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== +postcss-svgo@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.3.tgz#d945185756e5dfaae07f9edb0d3cae7ff79f9b30" + integrity sha512-41XZUA1wNDAZrQ3XgWREL/M2zSw8LJPvb5ZWivljBsUQAGoEKMYm6okHsTjJxKYI4M75RQEH4KYlEM52VwdXVA== dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" + postcss-value-parser "^4.1.0" + svgo "^2.7.0" -postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== +postcss-unique-selectors@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.2.tgz#5d6893daf534ae52626708e0d62250890108c0c1" + integrity sha512-w3zBVlrtZm7loQWRPVC0yjUwwpty7OM6DnEHkxcSQXO1bMS3RJ+JUS5LFMSDZHJcvGsRwhZinCWVqn8Kej4EDA== dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + alphanum-sort "^1.0.2" + postcss-selector-parser "^6.0.5" postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27: - version "7.0.36" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb" - integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.2.1: - version "8.3.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" - integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== + version "8.4.4" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.4.tgz#d53d4ec6a75fd62557a66bb41978bf47ff0c2869" + integrity sha512-joU6fBsN6EIer28Lj6GDFoC/5yOZzLCfn0zHAn/MYXI7aPt4m4hK5KC5ovEZXy+lnCjmYIbQWngvju2ddyEr8Q== dependencies: - colorette "^1.2.2" - nanoid "^3.1.23" - source-map-js "^0.6.2" + nanoid "^3.1.30" + picocolors "^1.0.0" + source-map-js "^1.0.1" power-assert-context-formatter@^1.0.7: version "1.2.0" @@ -8492,7 +7314,7 @@ pupa@^2.1.1: dependencies: escape-goat "^2.0.0" -q@^1.1.2, q@^1.5.1: +q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -8614,14 +7436,14 @@ redent@^4.0.0: indent-string "^5.0.0" strip-indent "^4.0.0" -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== +regenerate-unicode-properties@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" + integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA== dependencies: - regenerate "^1.4.0" + regenerate "^1.4.2" -regenerate@^1.4.0: +regenerate@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== @@ -8644,11 +7466,11 @@ regenerator-transform@^0.14.2: "@babel/runtime" "^7.8.4" regexp-tree@^0.1.23, regexp-tree@~0.1.1: - version "0.1.23" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.23.tgz#8a8ce1cc5e971acef62213a7ecdb1f6e18a1f1b2" - integrity sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw== + version "0.1.24" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" + integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== -regexp.prototype.flags@^1.2.0: +regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== @@ -8662,16 +7484,16 @@ regexpp@^3.0.0, regexpp@^3.2.0: integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" - integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== + version "4.8.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" + integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg== dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" + regenerate "^1.4.2" + regenerate-unicode-properties "^9.0.0" + regjsgen "^0.5.2" + regjsparser "^0.7.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" registry-auth-token@^4.0.0: version "4.2.1" @@ -8687,15 +7509,15 @@ registry-url@^5.0.0, registry-url@^5.1.0: dependencies: rc "^1.2.8" -regjsgen@^0.5.1: +regjsgen@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== -regjsparser@^0.6.4: - version "0.6.9" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.9.tgz#b489eef7c9a2ce43727627011429cf833a7183e6" - integrity sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ== +regjsparser@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" + integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ== dependencies: jsesc "~0.5.0" @@ -8756,11 +7578,6 @@ resolve-from@5.0.0, resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -8823,15 +7640,10 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" @@ -8849,13 +7661,13 @@ rollup-plugin-bundle-size@^1.0.3: maxmin "^2.1.0" rollup-plugin-postcss@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.0.tgz#2131fb6db0d5dce01a37235e4f6ad4523c681cea" - integrity sha512-OQzT+YspV01/6dxfyEw8lBO2px3hyL8Xn+k2QGctL7V/Yx2Z1QaMKdYVslP1mqv7RsKt6DROIlnbpmgJ3yxf6g== + version "4.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz#15e9462f39475059b368ce0e49c800fa4b1f7050" + integrity sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w== dependencies: chalk "^4.1.0" concat-with-sourcemaps "^1.1.0" - cssnano "^4.1.10" + cssnano "^5.0.1" import-cwd "^3.0.0" p-queue "^6.6.2" pify "^5.0.0" @@ -8896,9 +7708,9 @@ rollup-pluginutils@^2.8.2: estree-walker "^0.6.1" rollup@^2.35.1: - version "2.56.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.56.0.tgz#daa832955d2b58f1ed52a3c4c85b7d1adaf076d0" - integrity sha512-weEafgbjbHCnrtJPNyCrhYnjP62AkF04P0BcV/1mofy1+gytWln4VVB1OK462cq2EAyWzRDpTMheSP/o+quoiA== + version "2.60.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.1.tgz#4b34cd247f09b421f10a3c9286eda2ecf9972079" + integrity sha512-akwfnpjY0rXEDSn1UTVfKXJhPsEBu+imi1gqBA1ZkHGydUnkV/fWCC90P7rDaLEW8KTwBcS1G3N4893Ndz+jwg== optionalDependencies: fsevents "~2.3.2" @@ -8962,7 +7774,7 @@ safe-regex@^2.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@^1.1.4, sax@~1.2.4: +sax@^1.1.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -9044,16 +7856,9 @@ side-channel@^1.0.4: object-inspect "^1.9.0" signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" + version "3.0.6" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" + integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== slash@^3.0.0: version "3.0.0" @@ -9096,23 +7901,15 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" -source-map-js@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" - integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== - -source-map-support@^0.5.16, source-map-support@^0.5.19, source-map-support@~0.5.19: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" +source-map-js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.1.tgz#a1741c131e3c77d048252adfa24e23b908670caf" + integrity sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA== -source-map-support@^0.5.17, source-map-support@~0.5.20: - version "0.5.20" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" - integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== +source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -9159,9 +7956,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" - integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== + version "3.0.11" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" + integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== split2@^3.0.0: version "3.2.2" @@ -9203,9 +8000,9 @@ stable@^0.1.8: integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== stack-utils@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" - integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== + version "2.0.5" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== dependencies: escape-string-regexp "^2.0.0" @@ -9236,23 +8033,14 @@ string-width@^2.1.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.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-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" string-width@^5.0.0: version "5.0.1" @@ -9263,6 +8051,20 @@ string-width@^5.0.0: is-fullwidth-code-point "^4.0.0" strip-ansi "^7.0.1" +string.prototype.matchall@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz#5abb5dabc94c7b0ea2380f65ba610b3a544b15fa" + integrity sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.3.1" + side-channel "^1.0.4" + string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" @@ -9321,14 +8123,7 @@ strip-ansi@^5.1.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-ansi@^6.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -9381,14 +8176,13 @@ style-inject@^0.3.0: resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" integrity sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== -stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== +stylehacks@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.1.tgz#323ec554198520986806388c7fdaebc38d2c06fb" + integrity sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA== dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" + browserslist "^4.16.0" + postcss-selector-parser "^6.0.4" supertap@^2.0.0: version "2.0.0" @@ -9413,13 +8207,6 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -9428,9 +8215,9 @@ supports-color@^7.0.0, supports-color@^7.1.0: has-flag "^4.0.0" supports-color@^9.0.2: - version "9.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.1.0.tgz#558963681dafeff41ed68220488cbf438d29f351" - integrity sha512-lOCGOTmBSN54zKAoPWhHkjoqVQ0MqgzPE5iirtoSixhr0ZieR/6l7WZ32V53cvy9+1qghFnIk7k52p991lKd6g== + version "9.2.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.1.tgz#599dc9d45acf74c6176e0d880bab1d7d718fe891" + integrity sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ== supports-hyperlinks@^2.0.0: version "2.2.0" @@ -9440,24 +8227,18 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" -svgo@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" +svgo@^2.7.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24" + integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== + dependencies: + "@trysound/sax" "0.2.0" + commander "^7.2.0" + css-select "^4.1.3" + css-tree "^1.1.3" + csso "^4.2.0" + picocolors "^1.0.0" stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" symbol-observable@^1.1.0: version "1.2.0" @@ -9502,19 +8283,10 @@ terminal-link@^2.1.1: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser@^5.0.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.1.tgz#2dc7a61009b66bb638305cb2a824763b116bf784" - integrity sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.19" - -terser@^5.7.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.9.0.tgz#47d6e629a522963240f2b55fcaa3c99083d2c351" - integrity sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ== +terser@^5.0.0, terser@^5.7.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.10.0.tgz#b86390809c0389105eb0a0b62397563096ddafcc" + integrity sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -9640,9 +8412,9 @@ trim-newlines@^4.0.2: integrity sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew== trim-off-newlines@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" - integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= + version "1.0.3" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz#8df24847fcb821b0ab27d58ab6efec9f2fe961a1" + integrity sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg== trim-right@^1.0.1: version "1.0.1" @@ -9662,9 +8434,9 @@ ts-node@^9: yn "3.1.1" tsconfig-paths@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" - integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== + version "3.12.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" + integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" @@ -9681,16 +8453,11 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2: +tslib@^2, tslib@^2.0.3: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== - tslib@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" @@ -9775,9 +8542,9 @@ type-fest@^0.8.1: integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== type-fest@^1.0.1, type-fest@^1.2.1, type-fest@^1.2.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.3.0.tgz#6be848243853df1173fa95530112e1358ab0810b" - integrity sha512-mYUYkAy6fPatVWtUeCV/qGeGL3IVucmdJOzeAEfwgCJDx8gP0JaW8jn6KQ5xDfPec31e0KXWn5EUOZMhquR1zA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== type-fest@^2.0.0: version "2.6.0" @@ -9796,17 +8563,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^4.1.3: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== - -typescript@^4.4.3: - version "4.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" - integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== - -typescript@^4.5.2: +typescript@^4.1.3, typescript@^4.4.3, typescript@^4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998" integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw== @@ -9826,38 +8583,28 @@ unc-path-regex@^0.1.2: resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== -uniqs@^2.0.0: +unicode-property-aliases-ecmascript@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== unique-string@^2.0.0: version "2.0.0" @@ -9885,11 +8632,6 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= - update-notifier@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" @@ -9929,16 +8671,6 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" @@ -9950,9 +8682,9 @@ v8-compile-cache@^2.0.3: integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" - integrity sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg== + version "8.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz#0aeb763894f1a0a1676adf8a8b7612a38902446c" + integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -9978,11 +8710,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vendors@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" - integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -10178,9 +8905,9 @@ yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.0.0: - version "17.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.1.0.tgz#0cd9827a0572c9a1795361c4d1530e53ada168cf" - integrity sha512-SQr7qqmQ2sNijjJGHL4u7t8vyDZdZ3Ahkmo4sc1w5xI9TBX0QDdG/g4SFnxtWOsGLjwHQue57eFALfwFCnixgg== + version "17.2.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" + integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 8a73b4c13ed85fbd55702d392bf81a486ee62c27 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:37:31 +0200 Subject: [PATCH 04/50] :package: deps: Relocate deps specific to profiling and benchmarking. --- _benchmark/package.json | 15 +++ _benchmark/yarn.lock | 192 +++++++++++++++++++++++++++++++++++++ _profile/.gitignore | 3 + _profile/append.js | 25 ++--- _profile/babel.config.json | 33 +++++++ _profile/package.json | 12 +++ _profile/profile.sh | 7 ++ _profile/yarn.lock | 13 +++ package.json | 4 - yarn.lock | 46 +-------- 10 files changed, 288 insertions(+), 62 deletions(-) create mode 100644 _benchmark/package.json create mode 100644 _benchmark/yarn.lock create mode 100644 _profile/.gitignore create mode 100644 _profile/babel.config.json create mode 100644 _profile/package.json create mode 100644 _profile/profile.sh create mode 100644 _profile/yarn.lock diff --git a/_benchmark/package.json b/_benchmark/package.json new file mode 100644 index 00000000..493949cc --- /dev/null +++ b/_benchmark/package.json @@ -0,0 +1,15 @@ +{ + "type": "module", + "scripts": { + "bench": "node main.js" + }, + "dependencies": { + "@iterable-iterator/range": "^2.1.0", + "argparse": "^2.0.1", + "benchmark": "^2.1.4", + "benchtable": "0.1.0", + "fingertree": "^0.1.7", + "list": "^2.0.19", + "microtime": "^3.0.0" + } +} diff --git a/_benchmark/yarn.lock b/_benchmark/yarn.lock new file mode 100644 index 00000000..bc094dd3 --- /dev/null +++ b/_benchmark/yarn.lock @@ -0,0 +1,192 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@iterable-iterator/range@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@iterable-iterator/range/-/range-2.1.0.tgz#d7cfeee165c612f460c9ea1854a250f4788f1226" + integrity sha512-3/jhQR2FVpur0RmrHCksePYsahdZcGh7WKukDkI1xq3gwzmCQm3Nv0MwKttMf3viUGq6mV0BUHXybpLLfMCeKA== + +ansi-styles@^3.0.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" + +ansy@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/ansy/-/ansy-1.0.15.tgz#3915c82eb71aa8ddc37721c8c6db66d50d44c207" + integrity sha512-mQyNSn58HN7aEthofkap0hn8jg7/5SJWrB0ypExgcECOwLppc0njH+QBA9X5VMiEN9SM0JlFZWJQGycxxInAqg== + dependencies: + ansi-styles "^3.0.0" + custom-return "^1.0.0" + supports-color "^3.1.2" + ul "^5.2.1" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +benchmark@^2.0.0, benchmark@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" + integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik= + dependencies: + lodash "^4.17.4" + platform "^1.3.3" + +benchtable@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/benchtable/-/benchtable-0.1.0.tgz#b32a7d8442798106c1bd95bb18ca6cc9f995ff1c" + integrity sha1-syp9hEJ5gQbBvZW7GMpsyfmV/xw= + dependencies: + benchmark "^2.0.0" + cli-table "^0.3.1" + color-it "^1.2.0" + +cli-table@^0.3.1: + version "0.3.6" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.6.tgz#e9d6aa859c7fe636981fd3787378c2a20bce92fc" + integrity sha512-ZkNZbnZjKERTY5NwC2SeMeLeifSPq/pubeRoTpdr3WchLlnZg6hEgvHkK5zL7KNFdd9PmHN8lxrENUwI3cE8vQ== + dependencies: + colors "1.0.3" + +color-convert@^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-it@^1.2.0: + version "1.2.12" + resolved "https://registry.yarnpkg.com/color-it/-/color-it-1.2.12.tgz#3be7c4e0c242b9b2e6c48312751f78645bdbe1cb" + integrity sha512-15ymoygmMjfsrjfnxFcKGXk/7TFo0kuZ2ETBinKpBw4T4H5MZWDFa21fmwlwcJnOz4RzSGbYwi7lnUf2264vKw== + dependencies: + couleurs "^6.0.6" + flat-colors "^3.1.0" + iterate-object "^1.1.0" + typpy "^2.3.3" + +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= + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= + +couleurs@^6.0.6: + version "6.0.11" + resolved "https://registry.yarnpkg.com/couleurs/-/couleurs-6.0.11.tgz#15aa838cba5df3036c01a1c782d40ca9ed47e480" + integrity sha512-y5WUDtgQKw/tVViZCj3ACX8VseU0ONxiet8SRsE89uH4s/otRLXGOMymfVbKMFzedKOdxQpTcYWukRwkvgRYdw== + dependencies: + ansy "^1.0.0" + color-convert "^1.0.0" + iterate-object "^1.3.1" + typpy "^2.3.1" + +custom-return@^1.0.0: + version "1.0.12" + resolved "https://registry.yarnpkg.com/custom-return/-/custom-return-1.0.12.tgz#371bcda1f4baa63cd98c00e16b2d6523ba1b741e" + integrity sha512-Xy6IlEV6gW5Iu4YRoQe0A5RG1mzezawcTXzAk7u28oB2UilRfbbOc1C7RmWE6AJ1inSm8gghCkIpo0LUQfLbvw== + dependencies: + noop6 "^1.0.0" + +deffy@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/deffy/-/deffy-2.2.4.tgz#53c1b5f59b58a58150b1c9de5529229875c4cc17" + integrity sha512-pLc9lsbsWjr6RxmJ2OLyvm+9l4j1yK69h+TML/gUit/t3vTijpkNGh8LioaJYTGO7F25m6HZndADcUOo2PsiUg== + dependencies: + typpy "^2.0.0" + +fingertree@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/fingertree/-/fingertree-0.1.7.tgz#69a44f4a280f58ec3f157be767d5dfd0b05258c5" + integrity sha1-aaRPSigPWOw/FXvnZ9Xf0LBSWMU= + +flat-colors@^3.1.0: + version "3.3.12" + resolved "https://registry.yarnpkg.com/flat-colors/-/flat-colors-3.3.12.tgz#e93abe480cc3e78f9ea0563e3946f3162c849389" + integrity sha512-SYIhhJ+ElZbyyz6+e+xpyN3EboppIg1h6nZaMyEeDwXSY6a3jjp/gANDBmj8xwu+mMflj4UWCPkxRIH+rExDMQ== + +function.name@^1.0.3: + version "1.0.13" + resolved "https://registry.yarnpkg.com/function.name/-/function.name-1.0.13.tgz#eef045abc4b5ff4e3e9d001a53ce14e090c971c6" + integrity sha512-mVrqdoy5npWZyoXl4DxCeuVF6delDcQjVS9aPdvLYlBxtMTZDR2B5GVEQEoM1jJyspCqg3C0v4ABkLE7tp9xFA== + dependencies: + noop6 "^1.0.1" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + +iterate-object@^1.1.0, iterate-object@^1.3.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/iterate-object/-/iterate-object-1.3.4.tgz#fa50b1d9e58e340a7dd6b4c98c8a5e182e790096" + integrity sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw== + +list@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/list/-/list-2.0.19.tgz#370a3d7d3e24cfd5ced2c89cda2baf28e31e2830" + integrity sha512-nnVaRp4RaMAQkCpypTThsdxKqgPMiSwJq93eAm2/IbpUa8sd04XKBhkKu+bMk63HmdjK8b8Cuh4xARHWX2ye/Q== + +lodash@^4.17.4: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +microtime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/microtime/-/microtime-3.0.0.tgz#d140914bde88aa89b4f9fd2a18620b435af0f39b" + integrity sha512-SirJr7ZL4ow2iWcb54bekS4aWyBQNVcEDBiwAz9D/sTgY59A+uE8UJU15cp5wyZmPBwg/3zf8lyCJ5NUe1nVlQ== + dependencies: + node-addon-api "^1.2.0" + node-gyp-build "^3.8.0" + +node-addon-api@^1.2.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" + integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== + +node-gyp-build@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.9.0.tgz#53a350187dd4d5276750da21605d1cb681d09e25" + integrity sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A== + +noop6@^1.0.0, noop6@^1.0.1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/noop6/-/noop6-1.0.9.tgz#8749944c15c09f2cd2d562ac24f5a8341762a950" + integrity sha512-DB3Hwyd89dPr5HqEPg3YHjzvwh/mCqizC1zZ8vyofqc+TQRyPDnT4wgXXbLGF4z9YAzwwTLi8pNLhGqcbSjgkA== + +platform@^1.3.3: + version "1.3.6" + resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" + integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + +typpy@^2.0.0, typpy@^2.3.1, typpy@^2.3.3, typpy@^2.3.4: + version "2.3.13" + resolved "https://registry.yarnpkg.com/typpy/-/typpy-2.3.13.tgz#7e16a3aa83d7eecdfbd5ee615b9ffd785887ee7e" + integrity sha512-vOxIcQz9sxHi+rT09SJ5aDgVgrPppQjwnnayTrMye1ODaU8gIZTDM19t9TxmEElbMihx2Nq/0/b/MtyKfayRqA== + dependencies: + function.name "^1.0.3" + +ul@^5.2.1: + version "5.2.15" + resolved "https://registry.yarnpkg.com/ul/-/ul-5.2.15.tgz#426425355ae15df2d5d09b351aade26ed06dd9ed" + integrity sha512-svLEUy8xSCip5IWnsRa0UOg+2zP0Wsj4qlbjTmX6GJSmvKMHADBuHOm1dpNkWqWPIGuVSqzUkV3Cris5JrlTRQ== + dependencies: + deffy "^2.2.2" + typpy "^2.3.4" diff --git a/_profile/.gitignore b/_profile/.gitignore new file mode 100644 index 00000000..30470a2d --- /dev/null +++ b/_profile/.gitignore @@ -0,0 +1,3 @@ +# Generated files +/dist +/v8-deopt-viewer diff --git a/_profile/append.js b/_profile/append.js index bf43c3d2..d1a7717f 100644 --- a/_profile/append.js +++ b/_profile/append.js @@ -1,20 +1,10 @@ -console.time('prepare'); -require('regenerator-runtime/runtime'); -const ArgumentParser = require('argparse').ArgumentParser; -const range = require('@iterable-iterator/range').range; -const empty = require('..').empty; +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {empty} from './dist/profile/index.js'; -const COUNTER = { - plus(a, b) { - return a + b; - }, - measure(_x) { - return 1; - }, - zero() { - return 0; - }, -}; +console.time('prepare'); const parser = new ArgumentParser(); parser.add_argument('M', {default: 1000, nargs: '?'}); @@ -28,6 +18,7 @@ console.log('number of operations:', M * N); const t = empty(COUNTER); console.timeEnd('prepare'); +const r = range(M); console.time('append'); -for (let k = 0; k < N; ++k) t.append(range(M)); +for (let k = 0; k < N; ++k) t.append(r); console.timeEnd('append'); diff --git a/_profile/babel.config.json b/_profile/babel.config.json new file mode 100644 index 00000000..5a835318 --- /dev/null +++ b/_profile/babel.config.json @@ -0,0 +1,33 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "bugfixes": true, + "modules": false, + "targets": { + "esmodules": true + } + } + ] + ], + "plugins": [ + [ + "transform-remove-console", + { + "exclude": [ + "log", + "error", + "warn" + ] + } + ] + ], + "env": { + "profile": { + "plugins": [ + "babel-plugin-unassert" + ] + } + } +} diff --git a/_profile/package.json b/_profile/package.json new file mode 100644 index 00000000..777e220b --- /dev/null +++ b/_profile/package.json @@ -0,0 +1,12 @@ +{ + "type": "module", + "scripts": { + "build-cmd": "babel --delete-dir-on-start", + "build:profile": "yarn build-cmd --env-name profile --out-dir dist/profile ../src", + "profile": "sh profile.sh" + }, + "dependencies": { + "@iterable-iterator/range": "^2.1.0", + "argparse": "^2.0.1" + } +} diff --git a/_profile/profile.sh b/_profile/profile.sh new file mode 100644 index 00000000..e54ae897 --- /dev/null +++ b/_profile/profile.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +TIMESTAMP="$(date '+%Y-%m-%dT%H:%M:%S')" + +logfile="$(printf '%s-' "$@")${TIMESTAMP}-v8.log" + +node --prof --logfile="$logfile" "$@" diff --git a/_profile/yarn.lock b/_profile/yarn.lock new file mode 100644 index 00000000..a9328a69 --- /dev/null +++ b/_profile/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@iterable-iterator/range@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@iterable-iterator/range/-/range-2.1.0.tgz#d7cfeee165c612f460c9ea1854a250f4788f1226" + integrity sha512-3/jhQR2FVpur0RmrHCksePYsahdZcGh7WKukDkI1xq3gwzmCQm3Nv0MwKttMf3viUGq6mV0BUHXybpLLfMCeKA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== diff --git a/package.json b/package.json index 823b22a5..f98ee958 100644 --- a/package.json +++ b/package.json @@ -83,23 +83,19 @@ "@iterable-iterator/reversed": "1.0.0", "@iterable-iterator/tee": "2.0.0", "@js-library/commitlint-config": "0.0.4", - "argparse": "2.0.1", "ava": "3.15.0", "babel-plugin-transform-remove-console": "6.9.4", "babel-plugin-unassert": "3.2.0", "babel-preset-power-assert": "3.0.0", - "benchmark": "2.1.4", "c8": "7.10.0", "esdoc": "1.1.0", "esdoc-inject-script-plugin": "1.0.0", "esdoc-inject-style-plugin": "1.0.0", "esdoc-standard-plugin": "1.0.0", - "fingertree": "0.1.7", "fixpack": "4.0.0", "husky": "7.0.4", "lint-staged": "12.1.2", "microbundle": "0.14.2", - "microtime": "3.0.0", "np": "7.6.0", "pinst": "2.1.6", "power-assert": "1.6.1", diff --git a/yarn.lock b/yarn.lock index a0356267..1e23952e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1747,11 +1747,6 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@2.0.1, argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1759,6 +1754,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -2136,14 +2136,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -benchmark@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" - integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik= - dependencies: - lodash "^4.17.4" - platform "^1.3.3" - big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -4162,11 +4154,6 @@ find-up@^6.2.0: locate-path "^7.0.0" path-exists "^5.0.0" -fingertree@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/fingertree/-/fingertree-0.1.7.tgz#69a44f4a280f58ec3f157be767d5dfd0b05258c5" - integrity sha1-aaRPSigPWOw/FXvnZ9Xf0LBSWMU= - fixpack@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fixpack/-/fixpack-4.0.0.tgz#28b9fb8ca04f89aab382021cfa826b36dc381dfd" @@ -6072,14 +6059,6 @@ micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" -microtime@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/microtime/-/microtime-3.0.0.tgz#d140914bde88aa89b4f9fd2a18620b435af0f39b" - integrity sha512-SirJr7ZL4ow2iWcb54bekS4aWyBQNVcEDBiwAz9D/sTgY59A+uE8UJU15cp5wyZmPBwg/3zf8lyCJ5NUe1nVlQ== - dependencies: - node-addon-api "^1.2.0" - node-gyp-build "^3.8.0" - mime-db@1.51.0: version "1.51.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" @@ -6200,16 +6179,6 @@ new-github-release-url@^1.0.0: dependencies: type-fest "^0.4.1" -node-addon-api@^1.2.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" - integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== - -node-gyp-build@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.9.0.tgz#53a350187dd4d5276750da21605d1cb681d09e25" - integrity sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A== - node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -6835,11 +6804,6 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -platform@^1.3.3: - version "1.3.6" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" - integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== - plur@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/plur/-/plur-4.0.0.tgz#729aedb08f452645fe8c58ef115bf16b0a73ef84" From dc907041ccf820e4236b3758feae068a7463ce67 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:41:29 +0200 Subject: [PATCH 05/50] :construction: progress(benchmark): Add fromIterable benchmark. --- _benchmark/_fixtures.js | 49 +++++++++++ _benchmark/fromIterable.js | 169 +++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 219 insertions(+) create mode 100644 _benchmark/_fixtures.js create mode 100644 _benchmark/fromIterable.js diff --git a/_benchmark/_fixtures.js b/_benchmark/_fixtures.js new file mode 100644 index 00000000..6ddf0d9f --- /dev/null +++ b/_benchmark/_fixtures.js @@ -0,0 +1,49 @@ +import fs from 'fs'; + +export function packageInfo(packageName) { + const file = `node_modules/${packageName}/package.json`; + const raw = fs.readFileSync(file); + const json = JSON.parse(raw); + return json; +} + +export const load = async (path) => { + const exports = await import(path); + const stats = fs.statSync(path); + const mtime = stats.mtime; + const version = mtime.toISOString(); + + return { + version, + exports, + }; +}; + +const distPath = (name) => `../dist/index.${name}`; + +export const dist = (name) => ({ + name, + async load() { + const path = distPath(name); + const {version, exports} = await load(path); + return { + name, + version, + exports, + }; + }, +}); + +export const dependency = (name) => ({ + name, + async load() { + const path = name; + const exports = await import(path); + const {version} = packageInfo(name); + return { + name, + version, + exports, + }; + }, +}); diff --git a/_benchmark/fromIterable.js b/_benchmark/fromIterable.js new file mode 100644 index 00000000..e4901c6b --- /dev/null +++ b/_benchmark/fromIterable.js @@ -0,0 +1,169 @@ +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; + +import {range} from '@iterable-iterator/range'; +import Benchtable from 'benchtable'; +import { + FAST_COUNTER as COUNTER, + measure, + measureToString, + iterableToString, +} from '../test/src/_fixtures.js'; + +import {dist, dependency} from './_fixtures.js'; + +const parser = new ArgumentParser(); +parser.add_argument('filter'); +const args = parser.parse_args(); +const filter = new RegExp(args.filter, 'i'); + +const cjs = dist('cjs'); +const module = dist('module.js'); +const modern = dist('modern.js'); +const list = dependency('list'); + +const suite = new Benchtable('Tree Construction', {isTransposed: false}); + +const add = async (module, fn) => { + if (!filter.test(module.name)) return; + if (!filter.test(fn.name)) return; + const {title, build} = await fn.compile(module); + suite.addFunction( + title, + (measure, iterable) => { + build(measure, iterable); + }, + { + maxTime: 5, + }, + ); + if (!filter.test('measure')) return; + suite.addFunction( + `${title}.measure`, + (measure, iterable, expected) => { + const result = build(measure, iterable).measure(); + if (result !== expected) { + throw new Error('wrong measure'); + } + }, + { + maxTime: 5, + }, + ); +}; + +const makeFn = ({name: fnName, build}) => ({ + name: fnName, + compile: async (module) => { + const {name, version, exports} = await module.load(); + return { + title: `${name} ${version} #${fnName}`, + build: build({exports}), + }; + }, +}); + +const from = makeFn({ + name: 'from', + build: ({exports}) => { + const from = exports.from; + return (measure, iterable) => from(measure, iterable); + }, +}); + +const append = makeFn({ + name: 'append', + build: ({exports}) => { + const empty = exports.empty; + return (measure, iterable) => empty(measure).append(iterable); + }, +}); + +const prepend = makeFn({ + name: 'prepend', + build: ({exports}) => { + const empty = exports.empty; + return (measure, iterable) => empty(measure).prepend(iterable); + }, +}); + +const listFrom = makeFn({ + name: 'from', + build: ({exports}) => { + const from = exports.from; + return (_measure, iterable) => from(iterable); + }, +}); + +const listAppend = makeFn({ + name: 'append', + build: ({exports}) => { + const {empty, append} = exports; + return (_measure, iterable) => { + let l = empty(); + for (const x of iterable) l = append(x, l); + return l; + }; + }, +}); + +await add(cjs, from); +await add(cjs, append); +await add(cjs, prepend); +await add(module, from); +await add(module, append); +await add(module, prepend); +await add(modern, from); +await add(modern, append); +await add(modern, prepend); + +await add(list, listFrom); +await add(list, listAppend); + +const addTitle = (input) => { + const {measure, iterable} = input; + const title = `(${measureToString(measure)}, ${iterableToString(iterable)})`; + return { + ...input, + title, + }; +}; + +const addExpected = (input) => { + const expected = measure(input.measure, input.iterable); + return { + ...input, + expected, + }; +}; + +const benchmarkInputs = [ + { + measure: COUNTER, + iterable: range(1000), + }, + { + measure: COUNTER, + iterable: range(10_000), + }, + { + measure: COUNTER, + iterable: range(100_000), + }, +] + .map(addTitle) + .map(addExpected); + +for (const {title, measure, iterable, expected} of benchmarkInputs) { + suite.addInput(title, [measure, iterable, expected]); +} + +suite.on('cycle', (evt) => { + console.log(evt.target.name); +}); + +suite.on('complete', () => { + console.log(suite.table.toString()); +}); + +suite.run(); diff --git a/package.json b/package.json index f98ee958..53f21326 100644 --- a/package.json +++ b/package.json @@ -228,6 +228,7 @@ { "files": "_benchmark/*.js", "rules": { + "unicorn/no-array-callback-reference": "off", "import/no-unassigned-import": "off", "no-undef": "off" } From 22324582f923c45be4eceb08529d2b9d53fb4edc Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:44:34 +0200 Subject: [PATCH 06/50] :construction: progress(profiling): Add more profiling loops. --- _profile/append+measure.js | 24 ++++++++++++++++++++++++ _profile/from+measure.js | 23 +++++++++++++++++++++++ _profile/from.js | 23 +++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 _profile/append+measure.js create mode 100644 _profile/from+measure.js create mode 100644 _profile/from.js diff --git a/_profile/append+measure.js b/_profile/append+measure.js new file mode 100644 index 00000000..a065dad0 --- /dev/null +++ b/_profile/append+measure.js @@ -0,0 +1,24 @@ +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {empty} from './dist/profile/index.js'; + +console.time('prepare'); + +const parser = new ArgumentParser(); +parser.add_argument('M', {default: 1000, nargs: '?'}); +parser.add_argument('-N', {default: 1000}); +const args = parser.parse_args(); +const M = args.M; +const N = args.N; + +console.log('number of operations:', M * N); + +const t = empty(COUNTER); +console.timeEnd('prepare'); + +const r = range(M); +console.time('append+measure'); +for (let k = 0; k < N; ++k) t.append(r).measure(); +console.timeEnd('append+measure'); diff --git a/_profile/from+measure.js b/_profile/from+measure.js new file mode 100644 index 00000000..c95d3c0e --- /dev/null +++ b/_profile/from+measure.js @@ -0,0 +1,23 @@ +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {from} from './dist/profile/index.js'; + +console.time('prepare'); + +const parser = new ArgumentParser(); +parser.add_argument('M', {default: 1000, nargs: '?'}); +parser.add_argument('-N', {default: 1000}); +const args = parser.parse_args(); +const M = args.M; +const N = args.N; + +console.log('number of operations:', M * N); + +console.timeEnd('prepare'); + +const r = range(M); +console.time('from+measure'); +for (let k = 0; k < N; ++k) from(COUNTER, r).measure(); +console.timeEnd('from+measure'); diff --git a/_profile/from.js b/_profile/from.js new file mode 100644 index 00000000..09906727 --- /dev/null +++ b/_profile/from.js @@ -0,0 +1,23 @@ +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {from} from './dist/profile/index.js'; + +console.time('prepare'); + +const parser = new ArgumentParser(); +parser.add_argument('M', {default: 1000, nargs: '?'}); +parser.add_argument('-N', {default: 1000}); +const args = parser.parse_args(); +const M = args.M; +const N = args.N; + +console.log('number of operations:', M * N); + +console.timeEnd('prepare'); + +const r = range(M); +console.time('from'); +for (let k = 0; k < N; ++k) from(COUNTER, r); +console.timeEnd('from'); From af7387aadc56bd9a3e1424868519cfc80cf83474 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:24:56 +0200 Subject: [PATCH 07/50] :umbrella: test(concat/append): Prevent regression. --- package.json | 1 + test/src/_fixtures.js | 18 +++++++++ test/src/regression/digit/nodes/generated.js | 26 +++++++++++++ .../tree/implementations/Deep/append.js | 33 +++++++++++++++++ .../tree/implementations/Single/append.js | 37 +++++++++++++++++++ yarn.lock | 36 +++++++++++++++--- 6 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 test/src/regression/digit/nodes/generated.js create mode 100644 test/src/regression/tree/implementations/Deep/append.js create mode 100644 test/src/regression/tree/implementations/Single/append.js diff --git a/package.json b/package.json index 53f21326..b3750f65 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "@iterable-iterator/reversed": "1.0.0", "@iterable-iterator/tee": "2.0.0", "@js-library/commitlint-config": "0.0.4", + "@set-theory/cartesian-product": "^2.0.1", "ava": "3.15.0", "babel-plugin-transform-remove-console": "6.9.4", "babel-plugin-unassert": "3.2.0", diff --git a/test/src/_fixtures.js b/test/src/_fixtures.js index 51d93831..3e38a4dd 100644 --- a/test/src/_fixtures.js +++ b/test/src/_fixtures.js @@ -1,8 +1,11 @@ import {map} from '@iterable-iterator/map'; import {reduce} from '@iterable-iterator/reduce'; +import {reversed} from '@iterable-iterator/reversed'; import {Measures} from '@functional-abstraction/measure'; +import {empty} from '../../src/index.js'; + export const ABSTRACT_COUNTER = Measures.COUNTER; export const FAST_COUNTER = { @@ -32,3 +35,18 @@ export const measureToString = (M) => { }; export const iterableToString = (iterable) => iterable.toString(); + +export const fromToString = (measure, iterable) => + `from(${measureToString(measure)}, ${iterableToString(iterable)})`; + +export const fromLeft = (M, iterable) => { + let tree = empty(M); + for (const x of iterable) tree = tree.push(x); + return tree; +}; + +export const fromRight = (M, iterable) => { + let tree = empty(M); + for (const x of reversed(iterable)) tree = tree.cons(x); + return tree; +}; diff --git a/test/src/regression/digit/nodes/generated.js b/test/src/regression/digit/nodes/generated.js new file mode 100644 index 00000000..82e27933 --- /dev/null +++ b/test/src/regression/digit/nodes/generated.js @@ -0,0 +1,26 @@ +import test from 'ava'; + +import {range} from '@iterable-iterator/range'; +import {product} from '@set-theory/cartesian-product'; + +import { + ABSTRACT_COUNTER as COUNTER, + fromToString as f, + fromRight, + fromLeft, +} from '../../../_fixtures.js'; + +const cover = (t, M, A, B) => { + const left = fromLeft(M, A); + const right = fromRight(M, B); + const tree = left.concat(right); + const expected = Array.from(A).concat(Array.from(B)); + t.is(tree.measure(), expected.length); + t.deepEqual(Array.from(tree), expected); +}; + +cover.title = (title, M, A, B) => title ?? `${f(M, A)}.concat(${f(M, B)})`; + +for (const [m, n] of product([range(62)], 2)) { + test(cover, COUNTER, range(m), range(n)); +} diff --git a/test/src/regression/tree/implementations/Deep/append.js b/test/src/regression/tree/implementations/Deep/append.js new file mode 100644 index 00000000..7dcee2ae --- /dev/null +++ b/test/src/regression/tree/implementations/Deep/append.js @@ -0,0 +1,33 @@ +import test from 'ava'; + +import {range} from '@iterable-iterator/range'; + +import {ABSTRACT_COUNTER as COUNTER} from '../../../../_fixtures.js'; + +import {from} from '../../../../../../src/index.js'; + +test('empty', (t) => { + const r0 = range(0); + const r200 = range(200); + let tree = from(COUNTER, r200); + tree = tree.append(r0); + t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r0))); + t.is(tree.measure(), 200); +}); + +test('range(1)', (t) => { + const r1 = range(1); + const r200 = range(200); + let tree = from(COUNTER, r200); + tree = tree.append(r1); + t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r1))); + t.is(tree.measure(), 201); +}); + +test('r200', (t) => { + const r200 = range(200); + let tree = from(COUNTER, r200); + tree = tree.append(r200); + t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r200))); + t.is(tree.measure(), 400); +}); diff --git a/test/src/regression/tree/implementations/Single/append.js b/test/src/regression/tree/implementations/Single/append.js new file mode 100644 index 00000000..9482b05f --- /dev/null +++ b/test/src/regression/tree/implementations/Single/append.js @@ -0,0 +1,37 @@ +import test from 'ava'; + +import {range} from '@iterable-iterator/range'; + +import {ABSTRACT_COUNTER as COUNTER} from '../../../../_fixtures.js'; + +import {from} from '../../../../../../src/index.js'; + +test('empty', (t) => { + let tree = from(COUNTER, range(1)); + tree = tree.append(range(0)); + t.deepEqual( + Array.from(tree), + Array.from(range(1)).concat(Array.from(range(0))), + ); + t.is(tree.measure(), 1); +}); + +test('range(1)', (t) => { + let tree = from(COUNTER, range(1)); + tree = tree.append(range(1)); + t.deepEqual( + Array.from(tree), + Array.from(range(1)).concat(Array.from(range(1))), + ); + t.is(tree.measure(), 2); +}); + +test('range(200)', (t) => { + let tree = from(COUNTER, range(1)); + tree = tree.append(range(200)); + t.deepEqual( + Array.from(tree), + Array.from(range(1)).concat(Array.from(range(200))), + ); + t.is(tree.measure(), 201); +}); diff --git a/yarn.lock b/yarn.lock index 1e23952e..9bd707df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1137,6 +1137,13 @@ resolved "https://registry.yarnpkg.com/@data-structure-algebra/singly-linked-list/-/singly-linked-list-0.0.1.tgz#4360458718d92dc569cfc40c91df99c42ae2f4a3" integrity sha512-FuerF4/f8HZ99KE0zLzZs1dyHjgbugo6EhcVHkbHPNSIAQdzZkfUoGch4N/l+i5SU1ziW8BmsnYkKnFxCsWoNQ== +"@data-structure/deque@^9.0.0": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@data-structure/deque/-/deque-9.0.1.tgz#756f8a80d5bc3fe2be18a5739d051493397a6367" + integrity sha512-/LSOEPmWGZ10OiKfje06GNDM/fzbY1ZfXyvZKr+/a79ZTlGoTwsQW1uPvtmQDtBzs2h2VbPjHho4zNSP5YH0Zg== + dependencies: + "@failure-abstraction/error" "^6.0.1" + "@endemolshinegroup/cosmiconfig-typescript-loader@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz#eea4635828dde372838b0909693ebd9aafeec22d" @@ -1201,27 +1208,32 @@ resolved "https://registry.yarnpkg.com/@iterable-iterator/chain/-/chain-2.0.1.tgz#b02068df99408ac94c446f895b4e985eb0cd1938" integrity sha512-mWd0nx1knSaJ6kcysBFtjcQd18iBaDgY0Rlr6crcBg11cMwVRkjaz56w2gBTe6No9JmoYOwsXxPNWpAeF7eAoA== -"@iterable-iterator/count@^1.0.1": +"@iterable-iterator/count@^1.0.0", "@iterable-iterator/count@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/count/-/count-1.0.1.tgz#37c13ff5cb43528280fcf0c2c0791475ebff4cf2" integrity sha512-nLBcrNownYvXgye2CVnQvTjZ5d3C2b/5nrySDvQ9/7ej5pGSfkvYvIl4xcZcocViwIa49p6/72nkcDC1xkvpJg== +"@iterable-iterator/cycle@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@iterable-iterator/cycle/-/cycle-1.0.0.tgz#1cdb2e4a72c54e351145b23af31b4a1bb2919e0d" + integrity sha512-mJevpq7it2NEQ44c24Do2tg6O/Mvzpyo5ydHpqhT1+R1/VTc21Spw6bKio87Fnfz5fdCJ5pQQY+Ey2gdj8b3hw== + "@iterable-iterator/iter@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/iter/-/iter-1.0.1.tgz#11149acef0d28b689e0b998dc478113eda81871d" integrity sha512-/C/Ciq69we9C0wvqx0rOdnpXAoSW+UnyIV/ZQrUYDzmtguvUQ4HjiIPcU2Csdh705VS6TMkUhoaBHIGh44V3OA== -"@iterable-iterator/list@1.0.1", "@iterable-iterator/list@^1.0.1": +"@iterable-iterator/list@1.0.1", "@iterable-iterator/list@^1.0.0", "@iterable-iterator/list@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/list/-/list-1.0.1.tgz#e84fd841d7d58c2ad6d0c026f0612c8228dc97f5" integrity sha512-234a2cf0a0YhD1Ofb3F0xSjXDkqDK1xCiLnXoMUt/DWAt/odAvJToaxEFMemiKlAUvqF6E8MSi2v2UvlIOpBUA== -"@iterable-iterator/map@1.0.1", "@iterable-iterator/map@^1.0.1": +"@iterable-iterator/map@1.0.1", "@iterable-iterator/map@^1.0.0", "@iterable-iterator/map@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/map/-/map-1.0.1.tgz#7e4d82cb86877bf487e075347fde990ed21844da" integrity sha512-lUvX8/OCYRdof3eZii8ntJUvqW1MlL2ESkIcQj3cagajKVfBIBj058wE4ScrzQl6U2udMva/n2NwP70smdfZ+g== -"@iterable-iterator/next@^2.0.1": +"@iterable-iterator/next@^2.0.0", "@iterable-iterator/next@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@iterable-iterator/next/-/next-2.0.1.tgz#b58a7471984cd1165e3b93e3fea646f4137b370f" integrity sha512-D4E5JSH7xFEQqmJI8XMaotest1L1RM6wJssEDFRva81oZNZwPYmTlKErPZZVLnrZU/wTflEVwrImxUacoIZK3Q== @@ -1245,7 +1257,7 @@ resolved "https://registry.yarnpkg.com/@iterable-iterator/repeat/-/repeat-1.0.1.tgz#7724b993a80c014483c4f0d37c503ee460ac7b6d" integrity sha512-xwkIHYQNvxQvA8nMYrev41iCmokXosojMpHEfME8Q8ubzEQlsYS8rSqiydgMYPu/lPg1MyYRVzWazFDAShTwtg== -"@iterable-iterator/reversed@1.0.0": +"@iterable-iterator/reversed@1.0.0", "@iterable-iterator/reversed@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@iterable-iterator/reversed/-/reversed-1.0.0.tgz#6e656396b4453e4650c081d571fa4ba7ab3134e8" integrity sha512-nCy0OINBy6h1dcj75twbIW0oA5KhJ7Aweif/8kdUdAR86e5gb/byedt0LL72cjHB75VRbQY06f9WxZc8d7uPYA== @@ -1362,6 +1374,20 @@ dependencies: any-observable "^0.3.0" +"@set-theory/cartesian-product@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@set-theory/cartesian-product/-/cartesian-product-2.0.1.tgz#5b80994ae53e4c80e369c78cb369845de18d229c" + integrity sha512-ifjwAGPY52Dvmtm1jQV+6jEdHlKg9nMCnogb96YtbckUN9uESDK8slMRy0nQHFGf61i1kjVNGKMzOrGzFZJZkw== + dependencies: + "@data-structure/deque" "^9.0.0" + "@iterable-iterator/count" "^1.0.0" + "@iterable-iterator/cycle" "^1.0.0" + "@iterable-iterator/iter" "^1.0.1" + "@iterable-iterator/list" "^1.0.0" + "@iterable-iterator/map" "^1.0.0" + "@iterable-iterator/next" "^2.0.0" + "@iterable-iterator/reversed" "^1.0.0" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" From fee323c4c356e05a1d474a79c45ff974c60c9fe9 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 23:51:22 +0200 Subject: [PATCH 08/50] :microscope: test(nodes,from,concat,append,prepend): Increase coverage. --- test/src/_fixtures.js | 6 ++++ test/src/regression/digit/nodes/generated.js | 27 ++++++++++++++---- test/src/regression/fast/fill_right.js | 18 ++++++++++++ test/src/regression/fast/from_by_filling.js | 30 ++++++++++++++++++++ 4 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 test/src/regression/fast/fill_right.js create mode 100644 test/src/regression/fast/from_by_filling.js diff --git a/test/src/_fixtures.js b/test/src/_fixtures.js index 3e38a4dd..b939cd63 100644 --- a/test/src/_fixtures.js +++ b/test/src/_fixtures.js @@ -39,6 +39,12 @@ export const iterableToString = (iterable) => iterable.toString(); export const fromToString = (measure, iterable) => `from(${measureToString(measure)}, ${iterableToString(iterable)})`; +export const fromLeftToString = (measure, iterable) => + `fromLeft(${measureToString(measure)}, ${iterableToString(iterable)})`; + +export const fromRightToString = (measure, iterable) => + `fromRight(${measureToString(measure)}, ${iterableToString(iterable)})`; + export const fromLeft = (M, iterable) => { let tree = empty(M); for (const x of iterable) tree = tree.push(x); diff --git a/test/src/regression/digit/nodes/generated.js b/test/src/regression/digit/nodes/generated.js index 82e27933..33bb622f 100644 --- a/test/src/regression/digit/nodes/generated.js +++ b/test/src/regression/digit/nodes/generated.js @@ -5,12 +5,13 @@ import {product} from '@set-theory/cartesian-product'; import { ABSTRACT_COUNTER as COUNTER, - fromToString as f, - fromRight, fromLeft, + fromRight, + fromLeftToString as fl, + fromRightToString as fr, } from '../../../_fixtures.js'; -const cover = (t, M, A, B) => { +const flfr = (t, M, A, B) => { const left = fromLeft(M, A); const right = fromRight(M, B); const tree = left.concat(right); @@ -19,8 +20,24 @@ const cover = (t, M, A, B) => { t.deepEqual(Array.from(tree), expected); }; -cover.title = (title, M, A, B) => title ?? `${f(M, A)}.concat(${f(M, B)})`; +flfr.title = (title, M, A, B) => title ?? `${fl(M, A)}.concat(${fr(M, B)})`; + +const flifrt = (t, M, A, B) => { + const left = fromLeft(M, A).init(); + const right = fromRight(M, B).tail(); + const tree = left.concat(right); + const expected = Array.from(A).slice(0, -1).concat(Array.from(B).slice(1)); + t.is(tree.measure(), expected.length); + t.deepEqual(Array.from(tree), expected); +}; + +flifrt.title = (title, M, A, B) => + title ?? `${fl(M, A)}.init().concat(${fr(M, B)}.tail())`; for (const [m, n] of product([range(62)], 2)) { - test(cover, COUNTER, range(m), range(n)); + test(flfr, COUNTER, range(m), range(n)); +} + +for (const [m, n] of product([range(19)], 2)) { + test(flifrt, COUNTER, range(m), range(n)); } diff --git a/test/src/regression/fast/fill_right.js b/test/src/regression/fast/fill_right.js new file mode 100644 index 00000000..d1406bdd --- /dev/null +++ b/test/src/regression/fast/fill_right.js @@ -0,0 +1,18 @@ +import test from 'ava'; + +import {range} from '@iterable-iterator/range'; + +import {ABSTRACT_COUNTER as COUNTER, measure} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('left instanceof Four', (t) => { + const tree = empty(COUNTER) + .append(range(2)) + .cons(-1) + .cons(-2) + .cons(-3) + .append(range(2, 4)); + t.deepEqual(Array.from(tree), Array.from(range(-3, 4))); + t.is(tree.measure(), measure(COUNTER, range(-3, 4))); +}); diff --git a/test/src/regression/fast/from_by_filling.js b/test/src/regression/fast/from_by_filling.js new file mode 100644 index 00000000..4f3f7a52 --- /dev/null +++ b/test/src/regression/fast/from_by_filling.js @@ -0,0 +1,30 @@ +import test from 'ava'; + +import {tee} from '@iterable-iterator/tee'; +import {range} from '@iterable-iterator/range'; + +import { + ABSTRACT_COUNTER as COUNTER, + measure, + measureToString, + iterableToString, +} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +const macro = (t, M, iterable) => { + const [copy1, copy2, copy3] = tee(iterable, 3); + const tree = empty(M).append(copy1); + + t.is(tree.measure(), measure(M, copy2)); + + const expected = Array.from(copy3); + t.deepEqual(Array.from(tree), expected); +}; + +macro.title = (title, M, iterable) => + title ?? `empty(${measureToString(M)}).append(${iterableToString(iterable)})`; + +for (const i of range(10)) { + test(macro, COUNTER, range(i)); +} From a7dad80189b3f4b48a49366369d751964b849cc0 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 12:38:03 +0200 Subject: [PATCH 09/50] :test_tube: test: Sketch debug API to avoid private props direct access. --- src/5-api.js | 91 ++++++++++++++++++- test/src/FingerTree.js | 10 +- test/src/github-issue-121.js | 4 +- test/src/github-issue-73.js | 4 +- .../regression/core/concatenate/nodes/03.js | 15 ++- .../regression/core/concatenate/nodes/04.js | 15 ++- .../regression/core/concatenate/nodes/05.js | 15 ++- .../regression/core/concatenate/nodes/06.js | 15 ++- .../regression/core/concatenate/nodes/07.js | 15 ++- .../regression/core/concatenate/nodes/08.js | 15 ++- .../regression/core/concatenate/nodes/09.js | 15 ++- .../regression/core/concatenate/nodes/10.js | 15 ++- .../regression/core/concatenate/nodes/11.js | 15 ++- .../regression/core/concatenate/nodes/12.js | 31 +++++-- 14 files changed, 223 insertions(+), 52 deletions(-) diff --git a/src/5-api.js b/src/5-api.js index d18e5970..9dc995be 100644 --- a/src/5-api.js +++ b/src/5-api.js @@ -1,4 +1,93 @@ -import {Empty} from './3-tree/index.js'; +import assert from 'assert'; +import {Split} from './0-core/split/Split.js'; +import {One} from './1-digit/1-One.js'; +import {Two} from './1-digit/2-Two.js'; +import {Three} from './1-digit/3-Three.js'; +import {Four} from './1-digit/4-Four.js'; +import {Tree} from './3-tree/base/Tree.js'; +import {Empty} from './3-tree/implementations/0-Empty.js'; +import {Deep} from './3-tree/implementations/2-Deep.js'; export const empty = (M) => new Empty(M); export {from} from './0-core/index.js'; + +export const leftTree = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit.left; +}; + +export const rightTree = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit.right; +}; + +export const middleElement = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit.middle; +}; + +export const leftDigit = (tree) => { + assert(tree instanceof Deep); + return tree.left; +}; + +export const rightDigit = (tree) => { + assert(tree instanceof Deep); + return tree.right; +}; + +export const middleTree = (tree) => { + assert(tree instanceof Deep); + return tree.middle; +}; + +export const embeddedMeasure = (tree) => { + assert(tree instanceof Tree); + return tree.force().M; +}; + +export const nodes = (M, left, right) => { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); + return left._nodes(M, right); +}; + +export const nodesWithList = (M, left, list, right) => { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); + return left._nodes_with_list(M, list, right); +}; + +export const digitSize = (digit) => { + assert( + digit instanceof One || + digit instanceof Two || + digit instanceof Three || + digit instanceof Four, + ); + if (digit instanceof One) return 1; + if (digit instanceof Two) return 2; + if (digit instanceof Three) return 3; + return 4; +}; diff --git a/test/src/FingerTree.js b/test/src/FingerTree.js index 34bd6bf5..c3651135 100644 --- a/test/src/FingerTree.js +++ b/test/src/FingerTree.js @@ -10,7 +10,13 @@ import {reversed} from '@iterable-iterator/reversed'; import {gt} from '@functional-abstraction/predicate'; -import {empty, from} from '../../src/index.js'; +import { + empty, + from, + leftTree, + middleElement, + rightTree, +} from '../../src/index.js'; const {COUNTER} = Measures; @@ -171,7 +177,7 @@ test('FingerTree', (t) => { const split = F.splitTree(gt(4), COUNTER.zero()); t.deepEqual( - [list(split.left), split.middle, list(split.right)], + [list(leftTree(split)), middleElement(split), list(rightTree(split))], [list('abcd'), 'e', list('fgh')], 'splitTree', ); diff --git a/test/src/github-issue-121.js b/test/src/github-issue-121.js index 8ba3535c..258d698e 100644 --- a/test/src/github-issue-121.js +++ b/test/src/github-issue-121.js @@ -4,12 +4,12 @@ import {Measures} from '@functional-abstraction/measure'; import {gt} from '@functional-abstraction/predicate'; -import {from} from '../../src/index.js'; +import {from, leftTree} from '../../src/index.js'; const {COUNTER} = Measures; test('Cover Lazy#split', (t) => { const T = from(COUNTER, 'abcde'); const split = T.splitTree(gt(2), COUNTER.zero()); - t.is([...split.left.takeUntil(gt(1))].join(''), 'a'); + t.is([...leftTree(split).takeUntil(gt(1))].join(''), 'a'); }); diff --git a/test/src/github-issue-73.js b/test/src/github-issue-73.js index 64fadbce..87091361 100644 --- a/test/src/github-issue-73.js +++ b/test/src/github-issue-73.js @@ -4,7 +4,7 @@ import {Measures} from '@functional-abstraction/measure'; import {list} from '@iterable-iterator/list'; -import {from} from '../../src/index.js'; +import {from, leftTree, rightTree} from '../../src/index.js'; const {COUNTER} = Measures; @@ -14,7 +14,7 @@ function set(tree, index, value) { const split = tree.splitTree((m) => m > index, tree.M.zero()); - return split.left.push(value).concat(split.right); + return leftTree(split).push(value).concat(rightTree(split)); } test('github issue #73', (t) => { diff --git a/test/src/regression/core/concatenate/nodes/03.js b/test/src/regression/core/concatenate/nodes/03.js index 5aaed9eb..cd93f028 100644 --- a/test/src/regression/core/concatenate/nodes/03.js +++ b/test/src/regression/core/concatenate/nodes/03.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -23,9 +30,9 @@ test('cover', (t) => { B = B.push(x); // (x, ([xxx], (), [xxx]), xx) t.is( - A.middle.right.measure(COUNTER) + - A.right._nodes(COUNTER, B.left).length + - B.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(A))) + + nodes(COUNTER, rightDigit(A), leftDigit(B)).length + + digitSize(leftDigit(middleTree(B))), 3, ); diff --git a/test/src/regression/core/concatenate/nodes/04.js b/test/src/regression/core/concatenate/nodes/04.js index 7e73b756..cea5e91b 100644 --- a/test/src/regression/core/concatenate/nodes/04.js +++ b/test/src/regression/core/concatenate/nodes/04.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -23,9 +30,9 @@ test('cover', (t) => { B = B.push(x); // (x, ([xxx], (), [xxx]), xx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 4, ); diff --git a/test/src/regression/core/concatenate/nodes/05.js b/test/src/regression/core/concatenate/nodes/05.js index a183bd4a..0f3c246e 100644 --- a/test/src/regression/core/concatenate/nodes/05.js +++ b/test/src/regression/core/concatenate/nodes/05.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -25,9 +32,9 @@ test('cover', (t) => { B = B.push(x); // (x, ([xxx], (), [xxx]), xxx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 5, ); diff --git a/test/src/regression/core/concatenate/nodes/06.js b/test/src/regression/core/concatenate/nodes/06.js index 984684af..1b5960a0 100644 --- a/test/src/regression/core/concatenate/nodes/06.js +++ b/test/src/regression/core/concatenate/nodes/06.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -28,9 +35,9 @@ test('cover', (t) => { B = B.push(x).push(x); // (x, ([xxx], (), [xxx][xxx]), xxxx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 6, ); diff --git a/test/src/regression/core/concatenate/nodes/07.js b/test/src/regression/core/concatenate/nodes/07.js index c91becc7..1c9725f0 100644 --- a/test/src/regression/core/concatenate/nodes/07.js +++ b/test/src/regression/core/concatenate/nodes/07.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -29,9 +36,9 @@ test('cover', (t) => { B = B.push(x).push(x); // (x, ([xxx], (), [xxx][xxx]), xxxx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 7, ); diff --git a/test/src/regression/core/concatenate/nodes/08.js b/test/src/regression/core/concatenate/nodes/08.js index 2182b1ed..1503402d 100644 --- a/test/src/regression/core/concatenate/nodes/08.js +++ b/test/src/regression/core/concatenate/nodes/08.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -31,9 +38,9 @@ test('cover', (t) => { B = B.push(x); // (x, ([xxx], (), [xxx][xxx][xxx]), xx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 8, ); diff --git a/test/src/regression/core/concatenate/nodes/09.js b/test/src/regression/core/concatenate/nodes/09.js index 47d73732..8bc40e8a 100644 --- a/test/src/regression/core/concatenate/nodes/09.js +++ b/test/src/regression/core/concatenate/nodes/09.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -33,9 +40,9 @@ test('cover', (t) => { B = B.push(x).push(x); // (x, ([xxx], (), [xxx][xxx][xxx]), xxxx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 9, ); diff --git a/test/src/regression/core/concatenate/nodes/10.js b/test/src/regression/core/concatenate/nodes/10.js index 5d5b05ae..2a527271 100644 --- a/test/src/regression/core/concatenate/nodes/10.js +++ b/test/src/regression/core/concatenate/nodes/10.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -35,9 +42,9 @@ test('cover', (t) => { B = B.push(x); // (x, ([xxx], (), [xxx][xxx][xxx][xxx]), xx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 10, ); diff --git a/test/src/regression/core/concatenate/nodes/11.js b/test/src/regression/core/concatenate/nodes/11.js index 6dcfad59..afd3c07d 100644 --- a/test/src/regression/core/concatenate/nodes/11.js +++ b/test/src/regression/core/concatenate/nodes/11.js @@ -3,7 +3,14 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {nrepeat} from '@iterable-iterator/repeat'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + nodes, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -37,9 +44,9 @@ test('cover', (t) => { B = B.push(x).push(x); // (x, ([xxx], (), [xxx][xxx][xxx][xxx]), xxxx) t.is( - B.middle.right.measure(COUNTER) + - B.right._nodes(COUNTER, A.left).length + - A.middle.left.measure(COUNTER), + digitSize(rightDigit(middleTree(B))) + + nodes(COUNTER, rightDigit(B), leftDigit(A)).length + + digitSize(leftDigit(middleTree(A))), 11, ); diff --git a/test/src/regression/core/concatenate/nodes/12.js b/test/src/regression/core/concatenate/nodes/12.js index 2cf0ade3..dfff3c32 100644 --- a/test/src/regression/core/concatenate/nodes/12.js +++ b/test/src/regression/core/concatenate/nodes/12.js @@ -3,7 +3,16 @@ import test from 'ava'; import {Measures} from '@functional-abstraction/measure'; import {range} from '@iterable-iterator/range'; -import {empty} from '../../../../../../src/index.js'; +import { + empty, + leftDigit, + middleTree, + rightDigit, + embeddedMeasure, + nodes, + nodesWithList, + digitSize, +} from '../../../../../../src/index.js'; const {COUNTER} = Measures; @@ -16,16 +25,20 @@ test('cover', (t) => { for (const i of range(65)) B = B.push(i); // (1, (3, (45), 12), 4) - const M = B.middle.M; + const M = COUNTER; + const Am = middleTree(A); + const Bm = middleTree(B); + const cM = embeddedMeasure(Bm); + const Al = leftDigit(A); + const Br = rightDigit(B); + const Amm = middleTree(Am); + const Bmm = middleTree(Bm); t.is( - [...B.middle.middle.right].length + - B.middle.right._nodes_with_list( - M, - B.right._nodes(COUNTER, A.left), - A.middle.left, - ).length + - [...A.middle.middle.left].length, + digitSize(rightDigit(Bmm)) + + nodesWithList(cM, rightDigit(Bm), nodes(M, Br, Al), leftDigit(Am)) + .length + + digitSize(leftDigit(Amm)), 12, ); From 196675c3fbb69e308d8fae9243e129002c8f61aa Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 1 Oct 2021 11:44:43 +0200 Subject: [PATCH 10/50] :construction: progress(benchmark/fromIterable): Add Array construction. For comparison. --- _benchmark/_fixtures.js | 12 ++++++++++++ _benchmark/fromIterable.js | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/_benchmark/_fixtures.js b/_benchmark/_fixtures.js index 6ddf0d9f..e9bba6f7 100644 --- a/_benchmark/_fixtures.js +++ b/_benchmark/_fixtures.js @@ -1,4 +1,5 @@ import fs from 'fs'; +import process from 'process'; export function packageInfo(packageName) { const file = `node_modules/${packageName}/package.json`; @@ -47,3 +48,14 @@ export const dependency = (name) => ({ }; }, }); + +export const object = (name, exports) => ({ + name, + async load() { + return { + name, + version: process.version, + exports, + }; + }, +}); diff --git a/_benchmark/fromIterable.js b/_benchmark/fromIterable.js index e4901c6b..437cf77d 100644 --- a/_benchmark/fromIterable.js +++ b/_benchmark/fromIterable.js @@ -1,3 +1,5 @@ +import assert from 'assert'; + import 'regenerator-runtime/runtime.js'; import {ArgumentParser} from 'argparse'; @@ -10,7 +12,7 @@ import { iterableToString, } from '../test/src/_fixtures.js'; -import {dist, dependency} from './_fixtures.js'; +import {dist, dependency, object} from './_fixtures.js'; const parser = new ArgumentParser(); parser.add_argument('filter'); @@ -21,6 +23,7 @@ const cjs = dist('cjs'); const module = dist('module.js'); const modern = dist('modern.js'); const list = dependency('list'); +const array = object('Array', Array); const suite = new Benchtable('Tree Construction', {isTransposed: false}); @@ -79,6 +82,18 @@ const append = makeFn({ }, }); +const push = makeFn({ + name: 'push', + build: ({exports}) => { + const {empty} = exports; + return (measure, iterable) => { + let l = empty(measure); + for (const x of iterable) l = l.push(x); + return l; + }; + }, +}); + const prepend = makeFn({ name: 'prepend', build: ({exports}) => { @@ -96,7 +111,7 @@ const listFrom = makeFn({ }); const listAppend = makeFn({ - name: 'append', + name: 'push', build: ({exports}) => { const {empty, append} = exports; return (_measure, iterable) => { @@ -107,18 +122,35 @@ const listAppend = makeFn({ }, }); +const arrayPush = makeFn({ + name: 'push', + build: ({exports}) => { + assert(exports === Array); + return (_measure, iterable) => { + const l = []; + for (const x of iterable) l.push(x); + return l; + }; + }, +}); + await add(cjs, from); await add(cjs, append); await add(cjs, prepend); +await add(cjs, push); await add(module, from); await add(module, append); await add(module, prepend); +await add(module, push); await add(modern, from); await add(modern, append); await add(modern, prepend); +await add(modern, push); await add(list, listFrom); await add(list, listAppend); +await add(array, listFrom); +await add(array, arrayPush); const addTitle = (input) => { const {measure, iterable} = input; From 2fd09fc9f2622589e88f84fb6d997aa269e565e2 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 1 Oct 2021 11:45:45 +0200 Subject: [PATCH 11/50] :umbrella: test(append): Prevent regression on append's pureness. --- test/src/regression/fast/fill_right.js | 17 ++++----- .../tree/implementations/Deep/append.js | 36 ++++++++++++------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/test/src/regression/fast/fill_right.js b/test/src/regression/fast/fill_right.js index d1406bdd..5abb7aae 100644 --- a/test/src/regression/fast/fill_right.js +++ b/test/src/regression/fast/fill_right.js @@ -7,12 +7,13 @@ import {ABSTRACT_COUNTER as COUNTER, measure} from '../../_fixtures.js'; import {empty} from '../../../../src/index.js'; test('left instanceof Four', (t) => { - const tree = empty(COUNTER) - .append(range(2)) - .cons(-1) - .cons(-2) - .cons(-3) - .append(range(2, 4)); - t.deepEqual(Array.from(tree), Array.from(range(-3, 4))); - t.is(tree.measure(), measure(COUNTER, range(-3, 4))); + const before = empty(COUNTER).append(range(2)).cons(-1).cons(-2).cons(-3); + + const after = before.append(range(2, 4)); + + t.deepEqual(Array.from(after), Array.from(range(-3, 4))); + t.is(after.measure(), measure(COUNTER, range(-3, 4))); + + t.deepEqual(Array.from(before), Array.from(range(-3, 2))); + t.is(before.measure(), measure(COUNTER, range(-3, 2))); }); diff --git a/test/src/regression/tree/implementations/Deep/append.js b/test/src/regression/tree/implementations/Deep/append.js index 7dcee2ae..a5d06052 100644 --- a/test/src/regression/tree/implementations/Deep/append.js +++ b/test/src/regression/tree/implementations/Deep/append.js @@ -9,25 +9,37 @@ import {from} from '../../../../../../src/index.js'; test('empty', (t) => { const r0 = range(0); const r200 = range(200); - let tree = from(COUNTER, r200); - tree = tree.append(r0); - t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r0))); - t.is(tree.measure(), 200); + const before = from(COUNTER, r200); + const after = before.append(r0); + + t.deepEqual(Array.from(after), Array.from(r200).concat(Array.from(r0))); + t.is(after.measure(), 200); + + t.deepEqual(Array.from(before), Array.from(r200)); + t.is(before.measure(), 200); }); test('range(1)', (t) => { const r1 = range(1); const r200 = range(200); - let tree = from(COUNTER, r200); - tree = tree.append(r1); - t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r1))); - t.is(tree.measure(), 201); + const before = from(COUNTER, r200); + const after = before.append(r1); + + t.deepEqual(Array.from(after), Array.from(r200).concat(Array.from(r1))); + t.is(after.measure(), 201); + + t.deepEqual(Array.from(before), Array.from(r200)); + t.is(before.measure(), 200); }); test('r200', (t) => { const r200 = range(200); - let tree = from(COUNTER, r200); - tree = tree.append(r200); - t.deepEqual(Array.from(tree), Array.from(r200).concat(Array.from(r200))); - t.is(tree.measure(), 400); + const before = from(COUNTER, r200); + const after = before.append(r200); + + t.deepEqual(Array.from(after), Array.from(r200).concat(Array.from(r200))); + t.is(after.measure(), 400); + + t.deepEqual(Array.from(before), Array.from(r200)); + t.is(before.measure(), 200); }); From d2992231dd2b90592c2a57fdd1db2871d3ab2db8 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:32:14 +0200 Subject: [PATCH 12/50] :recycle: refactor(profile): Write better code and add analysis script. --- _profile/analyze.sh | 7 +++++++ _profile/package.json | 1 + _profile/push.js | 22 ++++++---------------- 3 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 _profile/analyze.sh diff --git a/_profile/analyze.sh b/_profile/analyze.sh new file mode 100644 index 00000000..3861d40e --- /dev/null +++ b/_profile/analyze.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +TIMESTAMP="$(date '+%Y-%m-%dT%H:%M:%S')" + +logfile="$(printf '%s-' "$@")${TIMESTAMP}-analyze-v8.log" + +node --prof --log-all --logfile="$logfile" "$@" diff --git a/_profile/package.json b/_profile/package.json index 777e220b..a05fa221 100644 --- a/_profile/package.json +++ b/_profile/package.json @@ -3,6 +3,7 @@ "scripts": { "build-cmd": "babel --delete-dir-on-start", "build:profile": "yarn build-cmd --env-name profile --out-dir dist/profile ../src", + "analyze": "sh analyze.sh", "profile": "sh profile.sh" }, "dependencies": { diff --git a/_profile/push.js b/_profile/push.js index c8885d31..ac1ecf65 100644 --- a/_profile/push.js +++ b/_profile/push.js @@ -1,19 +1,9 @@ -console.time('prepare'); -require('regenerator-runtime/runtime'); -const ArgumentParser = require('argparse').ArgumentParser; -const empty = require('..').empty; +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {empty} from './dist/profile/index.js'; -const COUNTER = { - plus(a, b) { - return a + b; - }, - measure(_x) { - return 1; - }, - zero() { - return 0; - }, -}; +console.time('prepare'); const parser = new ArgumentParser(); parser.add_argument('M', {default: 1000, nargs: '?'}); @@ -30,7 +20,7 @@ console.timeEnd('prepare'); console.time('push'); for (let k = 0; k < N; ++k) { let x = t; - for (let i = 0; i < M; ++i) x = x.push(); + for (let i = 0; i < M; ++i) x = x.push(i); } console.timeEnd('push'); From bc858a3bbeb485da1b523be0add81300d7dcaaf7 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:40:20 +0200 Subject: [PATCH 13/50] :construction: progress: More benchmarks. --- _benchmark/benchmark.js | 32 +++----- _benchmark/fromLoop.js | 158 ++++++++++++++++++++++++++++++++++++++++ _benchmark/table.js | 139 +++++++++++++++++++++++++++++++++++ _benchmark/tree.js | 25 ++----- 4 files changed, 313 insertions(+), 41 deletions(-) create mode 100644 _benchmark/fromLoop.js create mode 100644 _benchmark/table.js diff --git a/_benchmark/benchmark.js b/_benchmark/benchmark.js index b5a2e711..ba156b16 100644 --- a/_benchmark/benchmark.js +++ b/_benchmark/benchmark.js @@ -1,32 +1,20 @@ -require('regenerator-runtime/runtime'); +import 'regenerator-runtime/runtime.js'; -const ArgumentParser = require('argparse').ArgumentParser; -const Benchmark = require('benchmark'); +import {ArgumentParser} from 'argparse'; +import Benchmark from 'benchmark'; -const range = require('@iterable-iterator/range').range; +import {range} from '@iterable-iterator/range'; -const qiao_fingertree = require('fingertree'); -const fds_finger_tree = require('..'); +import qiao_fingertree from 'fingertree'; +import {empty, from} from '../dist/index.modern.js'; -const fromArray = qiao_fingertree.fromArray; -const empty = fds_finger_tree.empty; -const from = fds_finger_tree.from; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; -const COUNTER = { - plus(a, b) { - return a + b; - }, - measure(_x) { - return 1; - }, - zero() { - return 0; - }, -}; +const fromArray = qiao_fingertree.fromArray; const parser = new ArgumentParser(); -parser.addArgument(['M']); -const args = parser.parseArgs(); +parser.add_argument(['M']); +const args = parser.parse_args(); global.M = args.M; global.COUNTER = COUNTER; diff --git a/_benchmark/fromLoop.js b/_benchmark/fromLoop.js new file mode 100644 index 00000000..d06b6c1b --- /dev/null +++ b/_benchmark/fromLoop.js @@ -0,0 +1,158 @@ +import assert from 'assert'; + +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; + +import {range} from '@iterable-iterator/range'; + +import Benchtable from 'benchtable'; +import { + FAST_COUNTER as COUNTER, + measure, + measureToString, +} from '../test/src/_fixtures.js'; + +import {dist, dependency, object} from './_fixtures.js'; + +const parser = new ArgumentParser(); +parser.add_argument('filter'); +const args = parser.parse_args(); +const filter = new RegExp(args.filter, 'i'); + +const cjs = dist('cjs'); +const module = dist('module.js'); +const modern = dist('modern.js'); +const list = dependency('list'); +const array = object('Array', Array); + +const suite = new Benchtable('Tree Construction', {isTransposed: false}); + +const add = async (module, fn) => { + if (!filter.test(module.name)) return; + if (!filter.test(fn.name)) return; + const {title, build} = await fn.compile(module); + suite.addFunction( + title, + (measure, n) => { + build(measure, n); + }, + { + maxTime: 5, + }, + ); + if (!filter.test('measure')) return; + suite.addFunction( + `${title}.measure`, + (measure, n, expected) => { + const result = build(measure, n).measure(); + if (result !== expected) { + throw new Error('wrong measure'); + } + }, + { + maxTime: 5, + }, + ); +}; + +const makeFn = ({name: fnName, build}) => ({ + name: fnName, + compile: async (module) => { + const {name, version, exports} = await module.load(); + return { + title: `${name} ${version} #${fnName}`, + build: build({exports}), + }; + }, +}); + +const treePush = makeFn({ + name: 'push', + build: ({exports}) => { + const empty = exports.empty; + return (measure, n) => { + let l = empty(measure); + for (let i = 0; i < n; ++i) l = l.push(i); + return l; + }; + }, +}); + +const listAppend = makeFn({ + name: 'push', + build: ({exports}) => { + const {empty, append} = exports; + return (_measure, n) => { + let l = empty(); + for (let i = 0; i < n; ++i) l = append(i, l); + return l; + }; + }, +}); + +const arrayPush = makeFn({ + name: 'push', + build: ({exports}) => { + assert(exports === Array); + return (_measure, n) => { + const l = []; + for (let i = 0; i < n; ++i) l.push(i); + return l; + }; + }, +}); + +await add(cjs, treePush); +await add(module, treePush); +await add(modern, treePush); + +await add(list, listAppend); +await add(array, arrayPush); + +const addTitle = (input) => { + const {measure, n} = input; + const title = `(${measureToString(measure)}, ${n})`; + return { + ...input, + title, + }; +}; + +const addExpected = (input) => { + const expected = measure(input.measure, range(input.n)); + return { + ...input, + expected, + }; +}; + +const benchmarkInputs = [ + { + measure: COUNTER, + n: 1000, + }, + { + measure: COUNTER, + n: 10_000, + }, + { + measure: COUNTER, + n: 100_000, + }, +] + .map(addTitle) + .map(addExpected); + +for (const {title, measure, n, expected} of benchmarkInputs) { + suite.addInput(title, [measure, n, expected]); +} + +suite.on('cycle', (evt) => { + console.log(evt.target.name); +}); + +suite.on('complete', () => { + console.log(suite.table.toString()); +}); + +suite.run(); diff --git a/_benchmark/table.js b/_benchmark/table.js new file mode 100644 index 00000000..d7df604a --- /dev/null +++ b/_benchmark/table.js @@ -0,0 +1,139 @@ +import 'regenerator-runtime/runtime.js'; + +import {ArgumentParser} from 'argparse'; +import Benchtable from 'benchtable'; + +import {range} from '@iterable-iterator/range'; + +import { + FAST_COUNTER as COUNTER, + measureToString, +} from '../test/src/_fixtures.js'; + +import {dist} from './_fixtures.js'; + +const parser = new ArgumentParser(); +parser.add_argument('M'); +const args = parser.parse_args(); + +global.range = range; +global.n = args.M; +global.measure = COUNTER; + +const suite = new Benchtable('Methods', {isTransposed: false}); + +const modern = dist('modern.js'); +const {name, version, exports} = await modern.load(); + +const {empty, from} = exports; + +global.empty = empty; +global.from = from; + +global.t = empty(measure); +global.r = range(n); +global.at = from(measure, r); + +const splits = []; +for (let i = 0; i < n; ++i) { + splits.push(at.split((m) => m > i)); +} + +global.splits = splits; + +const fds_finger_tree = { + name: '@functional-data-structure/finger-tree', + compile: async () => ({ + title: `${name} ${version}`, + methods: { + push: { + run: () => { + let _t = t; + const _n = n; + for (let i = 0; i < _n; ++i) _t = _t.push(i); + }, + }, + cons: { + run: () => { + let _t = t; + const _n = n; + for (let i = 0; i < _n; ++i) _t = _t.cons(i); + }, + }, + init: { + run: () => { + let _t = at; + const _n = n; + for (let i = 0; i < _n; ++i) _t = _t.init(); + }, + }, + tail: { + run: () => { + let _t = at; + const _n = n; + for (let i = 0; i < _n; ++i) _t = _t.tail(); + }, + }, + append: { + run: () => { + at.append(r); + }, + }, + prepend: { + run: () => { + at.prepend(r); + }, + }, + from: { + run: () => { + from(measure, r); + }, + }, + split: { + run: () => { + const _at = at; + const _n = n; + for (let i = 0; i < _n; ++i) _at.split((m) => m > i); + }, + }, + concat: { + run: () => { + const _s = splits; + const _n = n; + for (let i = 0; i < _n; ++i) _s[i][0].concat(_s[i][1]); + }, + }, + }, + }), +}; + +const add = async (module, api, method) => { + // If (!filter.test(module.name)) return; + const {title, methods} = await api.compile(module); + + suite.addFunction(`${title} #${method}`, methods[method].run, { + maxTime: 5, + }); +}; + +await add(modern, fds_finger_tree, 'from'); +await add(modern, fds_finger_tree, 'push'); +await add(modern, fds_finger_tree, 'cons'); +await add(modern, fds_finger_tree, 'init'); +await add(modern, fds_finger_tree, 'tail'); +await add(modern, fds_finger_tree, 'append'); +await add(modern, fds_finger_tree, 'prepend'); +await add(modern, fds_finger_tree, 'split'); +await add(modern, fds_finger_tree, 'concat'); + +suite.addInput(`(${measureToString(measure)}, ${n})`, []); + +suite.on('cycle', (evt) => { + console.log(`${evt.target.name}: ${evt.target.hz} ops/sec`); +}); + +suite.on('complete', () => { + console.log(suite.table.toString()); +}); + +suite.run(); diff --git a/_benchmark/tree.js b/_benchmark/tree.js index 2a42984e..3ba7ca08 100644 --- a/_benchmark/tree.js +++ b/_benchmark/tree.js @@ -1,25 +1,12 @@ -require('regenerator-runtime/runtime'); -const range = require('@iterable-iterator/range').range; -const fingertree = require('..'); - -const empty = fingertree.empty; -const from = fingertree.from; - -const COUNTER = { - plus(a, b) { - return a + b; - }, - measure(_x) { - return 1; - }, - zero() { - return 0; - }, -}; +import 'regenerator-runtime/runtime.js'; +import {range} from '@iterable-iterator/range'; +import {empty, from} from '../dist/index.modern.js'; + +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; let t; let i; -const length = 100_000; +const length = 300_000; let start = Date.now(); From 89f4ab00db852c54206b50946993f6cf79ce88f1 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:46:25 +0200 Subject: [PATCH 14/50] :test_tube: test: Do not pull source in fixtures. --- test/src/_fixtures.js | 8 ++------ test/src/regression/digit/nodes/generated.js | 10 ++++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/src/_fixtures.js b/test/src/_fixtures.js index b939cd63..27aa7cf3 100644 --- a/test/src/_fixtures.js +++ b/test/src/_fixtures.js @@ -4,8 +4,6 @@ import {reversed} from '@iterable-iterator/reversed'; import {Measures} from '@functional-abstraction/measure'; -import {empty} from '../../src/index.js'; - export const ABSTRACT_COUNTER = Measures.COUNTER; export const FAST_COUNTER = { @@ -45,14 +43,12 @@ export const fromLeftToString = (measure, iterable) => export const fromRightToString = (measure, iterable) => `fromRight(${measureToString(measure)}, ${iterableToString(iterable)})`; -export const fromLeft = (M, iterable) => { - let tree = empty(M); +export const fromLeft = (tree, iterable) => { for (const x of iterable) tree = tree.push(x); return tree; }; -export const fromRight = (M, iterable) => { - let tree = empty(M); +export const fromRight = (tree, iterable) => { for (const x of reversed(iterable)) tree = tree.cons(x); return tree; }; diff --git a/test/src/regression/digit/nodes/generated.js b/test/src/regression/digit/nodes/generated.js index 33bb622f..7b3878c0 100644 --- a/test/src/regression/digit/nodes/generated.js +++ b/test/src/regression/digit/nodes/generated.js @@ -11,9 +11,11 @@ import { fromRightToString as fr, } from '../../../_fixtures.js'; +import {empty} from '../../../../../src/index.js'; + const flfr = (t, M, A, B) => { - const left = fromLeft(M, A); - const right = fromRight(M, B); + const left = fromLeft(empty(M), A); + const right = fromRight(empty(M), B); const tree = left.concat(right); const expected = Array.from(A).concat(Array.from(B)); t.is(tree.measure(), expected.length); @@ -23,8 +25,8 @@ const flfr = (t, M, A, B) => { flfr.title = (title, M, A, B) => title ?? `${fl(M, A)}.concat(${fr(M, B)})`; const flifrt = (t, M, A, B) => { - const left = fromLeft(M, A).init(); - const right = fromRight(M, B).tail(); + const left = fromLeft(empty(M), A).init(); + const right = fromRight(empty(M), B).tail(); const tree = left.concat(right); const expected = Array.from(A).slice(0, -1).concat(Array.from(B).slice(1)); t.is(tree.measure(), expected.length); From 03c005eb45fd0b12392fbebd2329262973a52567 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 23:58:39 +0200 Subject: [PATCH 15/50] :construction: progress: Add code to bench and profile split and iterators. --- _benchmark/package.json | 1 + _benchmark/table.js | 13 +++++++++++++ _benchmark/yarn.lock | 5 +++++ _profile/iterator.js | 27 +++++++++++++++++++++++++++ _profile/split.js | 24 +++++++----------------- 5 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 _profile/iterator.js diff --git a/_benchmark/package.json b/_benchmark/package.json index 493949cc..a35bc12f 100644 --- a/_benchmark/package.json +++ b/_benchmark/package.json @@ -4,6 +4,7 @@ "bench": "node main.js" }, "dependencies": { + "@iterable-iterator/consume": "^1.0.1", "@iterable-iterator/range": "^2.1.0", "argparse": "^2.0.1", "benchmark": "^2.1.4", diff --git a/_benchmark/table.js b/_benchmark/table.js index d7df604a..5c0a3ef6 100644 --- a/_benchmark/table.js +++ b/_benchmark/table.js @@ -4,6 +4,7 @@ import {ArgumentParser} from 'argparse'; import Benchtable from 'benchtable'; import {range} from '@iterable-iterator/range'; +import {exhaust} from '@iterable-iterator/consume'; import { FAST_COUNTER as COUNTER, @@ -103,6 +104,16 @@ const fds_finger_tree = { for (let i = 0; i < _n; ++i) _s[i][0].concat(_s[i][1]); }, }, + iterator: { + run: () => { + exhaust(at[Symbol.iterator]()); + }, + }, + reversed: { + run: () => { + exhaust(at.reversed()); + }, + }, }, }), }; @@ -125,6 +136,8 @@ await add(modern, fds_finger_tree, 'append'); await add(modern, fds_finger_tree, 'prepend'); await add(modern, fds_finger_tree, 'split'); await add(modern, fds_finger_tree, 'concat'); +await add(modern, fds_finger_tree, 'iterator'); +await add(modern, fds_finger_tree, 'reversed'); suite.addInput(`(${measureToString(measure)}, ${n})`, []); diff --git a/_benchmark/yarn.lock b/_benchmark/yarn.lock index bc094dd3..806cbf75 100644 --- a/_benchmark/yarn.lock +++ b/_benchmark/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@iterable-iterator/consume@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@iterable-iterator/consume/-/consume-1.0.1.tgz#abbe00af0d48542eb8e240f698e85fd4ba9b28b0" + integrity sha512-KVJufzV8/gOnYqrtO4CFdGZopJ5kkUBhzHcbU0iToOv5aTl0igxnsRzCaDSxUgO4q0mDbf9WEfjz4K39cl1iNA== + "@iterable-iterator/range@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@iterable-iterator/range/-/range-2.1.0.tgz#d7cfeee165c612f460c9ea1854a250f4788f1226" diff --git a/_profile/iterator.js b/_profile/iterator.js new file mode 100644 index 00000000..c2f9030c --- /dev/null +++ b/_profile/iterator.js @@ -0,0 +1,27 @@ +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {from} from './dist/profile/index.js'; + +console.time('prepare'); + +const parser = new ArgumentParser(); +parser.add_argument('M', {default: 1000, nargs: '?'}); +parser.add_argument('-N', {default: 1000}); +const args = parser.parse_args(); +const M = args.M; +const N = args.N; + +console.log('number of operations:', M * N); + +const t = from(COUNTER, range(M)); +console.timeEnd('prepare'); + +console.time('split'); +for (let k = 0; k < N; ++k) { + // eslint-disable-next-line no-unused-vars + for (const _x of t); +} + +console.timeEnd('split'); diff --git a/_profile/split.js b/_profile/split.js index eb44e399..d976af9b 100644 --- a/_profile/split.js +++ b/_profile/split.js @@ -1,20 +1,10 @@ -console.time('prepare'); -require('regenerator-runtime/runtime'); -const ArgumentParser = require('argparse').ArgumentParser; -const range = require('@iterable-iterator/range').range; -const empty = require('..').empty; +import 'regenerator-runtime/runtime.js'; +import {ArgumentParser} from 'argparse'; +import {range} from '@iterable-iterator/range'; +import {FAST_COUNTER as COUNTER} from '../test/src/_fixtures.js'; +import {from} from './dist/profile/index.js'; -const COUNTER = { - plus(a, b) { - return a + b; - }, - measure(_x) { - return 1; - }, - zero() { - return 0; - }, -}; +console.time('prepare'); const parser = new ArgumentParser(); parser.add_argument('M', {default: 1000, nargs: '?'}); @@ -25,7 +15,7 @@ const N = args.N; console.log('number of operations:', M * N); -const t = empty(COUNTER).append(range(M)); +const t = from(COUNTER, range(M)); console.timeEnd('prepare'); console.time('split'); From 2c891cffecab5fc73beb2377a0f4b8f619ced12c Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:07:31 +0200 Subject: [PATCH 16/50] :microscope: test: Increase coverage. --- package.json | 1 + test/src/regression/digit/Four/splitDigit.js | 24 ++++++++++++++++++++ test/src/regression/digit/Two/splitDigit.js | 22 ++++++++++++++++++ test/src/regression/lazy/app3.js | 20 ++++++++++++++++ test/src/regression/lazy/cons.js | 16 +++++++++++++ test/src/regression/lazy/last.js | 21 +++++++++++++++++ test/src/regression/lazy/push.js | 16 +++++++++++++ test/src/regression/lazy/reversed.js | 15 ++++++++++++ test/src/regression/lazy/splitTree.js | 17 ++++++++++++++ test/src/regression/node/reversed.js | 19 ++++++++++++++++ 10 files changed, 171 insertions(+) create mode 100644 test/src/regression/digit/Four/splitDigit.js create mode 100644 test/src/regression/digit/Two/splitDigit.js create mode 100644 test/src/regression/lazy/app3.js create mode 100644 test/src/regression/lazy/cons.js create mode 100644 test/src/regression/lazy/last.js create mode 100644 test/src/regression/lazy/push.js create mode 100644 test/src/regression/lazy/reversed.js create mode 100644 test/src/regression/lazy/splitTree.js create mode 100644 test/src/regression/node/reversed.js diff --git a/package.json b/package.json index b3750f65..72b3d449 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@functional-abstraction/measure": "4.0.0", "@functional-abstraction/predicate": "4.0.0", "@iterable-iterator/chain": "2.0.1", + "@iterable-iterator/cycle": "^1.0.0", "@iterable-iterator/list": "1.0.1", "@iterable-iterator/map": "1.0.1", "@iterable-iterator/range": "2.1.0", diff --git a/test/src/regression/digit/Four/splitDigit.js b/test/src/regression/digit/Four/splitDigit.js new file mode 100644 index 00000000..e6c82136 --- /dev/null +++ b/test/src/regression/digit/Four/splitDigit.js @@ -0,0 +1,24 @@ +import test from 'ava'; + +import {ABSTRACT_COUNTER as COUNTER} from '../../../_fixtures.js'; + +import {empty} from '../../../../../src/index.js'; + +const cover = (t, j) => { + t.true(Number.isInteger(j) && j >= 0 && j <= 3); + const x = {}; + const n = 11; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (4) + const [left, right] = tree.split((m) => m >= n - j); + t.is(left.measure(), n - (j + 1)); + t.is(right.measure(), j + 1); + t.deepEqual(Array.from(left.concat(right)), Array.from(tree)); +}; + +cover.title = (title, i) => title ?? `cover ${i}`; + +test(cover, 0); +test(cover, 1); +test(cover, 2); +test(cover, 3); diff --git a/test/src/regression/digit/Two/splitDigit.js b/test/src/regression/digit/Two/splitDigit.js new file mode 100644 index 00000000..db8ba6e8 --- /dev/null +++ b/test/src/regression/digit/Two/splitDigit.js @@ -0,0 +1,22 @@ +import test from 'ava'; + +import {ABSTRACT_COUNTER as COUNTER} from '../../../_fixtures.js'; + +import {empty} from '../../../../../src/index.js'; + +const cover = (t, j) => { + t.true(Number.isInteger(j) && j >= 0 && j <= 1); + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + const [left, right] = tree.split((m) => m >= n - j); + t.is(left.measure(), n - (j + 1)); + t.is(right.measure(), j + 1); + t.deepEqual(Array.from(left.concat(right)), Array.from(tree)); +}; + +cover.title = (title, i) => title ?? `cover ${i}`; + +test(cover, 0); +test(cover, 1); diff --git a/test/src/regression/lazy/app3.js b/test/src/regression/lazy/app3.js new file mode 100644 index 00000000..b8817f4e --- /dev/null +++ b/test/src/regression/lazy/app3.js @@ -0,0 +1,20 @@ +import test from 'ava'; + +import {nrepeat} from '@iterable-iterator/repeat'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + tree = tree.init().init(); // (1) ((3)) (3) + const A = tree.concat(tree); + t.deepEqual(Array.from(A), Array.from(nrepeat(x, 2 * (n - 2)))); + + tree = tree.init().init().init(); // (1) () (3) + const B = tree.concat(tree); + t.deepEqual(Array.from(B), Array.from(nrepeat(x, 2 * (n - 5)))); +}); diff --git a/test/src/regression/lazy/cons.js b/test/src/regression/lazy/cons.js new file mode 100644 index 00000000..e3c4aeb4 --- /dev/null +++ b/test/src/regression/lazy/cons.js @@ -0,0 +1,16 @@ +import test from 'ava'; + +import {nrepeat} from '@iterable-iterator/repeat'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + tree = tree.init().init(); // (1) ((3)) (3) + tree = tree.cons(x).cons(x).cons(x).cons(x); // (2) ((3)(3)) (3) + t.deepEqual(Array.from(tree), Array.from(nrepeat(x, n + 2))); +}); diff --git a/test/src/regression/lazy/last.js b/test/src/regression/lazy/last.js new file mode 100644 index 00000000..396c1f67 --- /dev/null +++ b/test/src/regression/lazy/last.js @@ -0,0 +1,21 @@ +import test from 'ava'; + +import {nrepeat} from '@iterable-iterator/repeat'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + for (let i = 0; i < n; ++i) { + const copy = tree.init().push(x); + t.deepEqual(Array.from(copy), Array.from(nrepeat(x, n - i))); + t.false(copy.isEmpty()); + tree = tree.init(); + } + + t.true(tree.isEmpty()); +}); diff --git a/test/src/regression/lazy/push.js b/test/src/regression/lazy/push.js new file mode 100644 index 00000000..7c9a6f50 --- /dev/null +++ b/test/src/regression/lazy/push.js @@ -0,0 +1,16 @@ +import test from 'ava'; + +import {nrepeat} from '@iterable-iterator/repeat'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + tree = tree.init().init(); // (1) ((3)) (3) + tree = tree.push(x).push(x); // (1) ((3)(3)) (2) + t.deepEqual(Array.from(tree), Array.from(nrepeat(x, n))); +}); diff --git a/test/src/regression/lazy/reversed.js b/test/src/regression/lazy/reversed.js new file mode 100644 index 00000000..1e8129b0 --- /dev/null +++ b/test/src/regression/lazy/reversed.js @@ -0,0 +1,15 @@ +import test from 'ava'; + +import {nrepeat} from '@iterable-iterator/repeat'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + tree = tree.init().init(); // (1) ((3)) (3) + t.deepEqual(Array.from(tree.reversed()), Array.from(nrepeat(x, n - 2))); +}); diff --git a/test/src/regression/lazy/splitTree.js b/test/src/regression/lazy/splitTree.js new file mode 100644 index 00000000..01f299b3 --- /dev/null +++ b/test/src/regression/lazy/splitTree.js @@ -0,0 +1,17 @@ +import test from 'ava'; + +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const x = {}; + const n = 9; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(x); // (1) ((3)(3)) (2) + tree = tree.init().init(); // (1) ((3)) (3) + const [left, right] = tree.split((m) => m >= 3); + t.is(left.measure(), 2); + t.is(right.measure(), n - 4); + t.deepEqual(Array.from(left.concat(right)), Array.from(tree)); +}); diff --git a/test/src/regression/node/reversed.js b/test/src/regression/node/reversed.js new file mode 100644 index 00000000..fde46199 --- /dev/null +++ b/test/src/regression/node/reversed.js @@ -0,0 +1,19 @@ +import test from 'ava'; + +import {ncycle} from '@iterable-iterator/cycle'; +import {reversed} from '@iterable-iterator/reversed'; +import {range} from '@iterable-iterator/range'; +import {ABSTRACT_COUNTER as COUNTER} from '../../_fixtures.js'; + +import {empty} from '../../../../src/index.js'; + +test('cover', (t) => { + const n = 11; + let tree = empty(COUNTER); + for (let i = 0; i < n; ++i) tree = tree.push(i); // (1) ((3)(3)) (4) + tree = tree.concat(tree); + t.deepEqual( + Array.from(tree.reversed()), + Array.from(ncycle(reversed(range(n)), 2)), + ); +}); From 7fc67b244cbadb4e285b6248f933d511973935d9 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:15:03 +0200 Subject: [PATCH 17/50] :construction: progress(profile/iterator): Fix timer title. --- _profile/iterator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_profile/iterator.js b/_profile/iterator.js index c2f9030c..e35465cc 100644 --- a/_profile/iterator.js +++ b/_profile/iterator.js @@ -18,10 +18,10 @@ console.log('number of operations:', M * N); const t = from(COUNTER, range(M)); console.timeEnd('prepare'); -console.time('split'); +console.time('iterator'); for (let k = 0; k < N; ++k) { // eslint-disable-next-line no-unused-vars for (const _x of t); } -console.timeEnd('split'); +console.timeEnd('iterator'); From a2ee7ff83beb6b9bcc621c4638e916011f8298b6 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:02:43 +0200 Subject: [PATCH 18/50] :construction: progress(benchmark/table): Add filter option. --- _benchmark/table.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_benchmark/table.js b/_benchmark/table.js index 5c0a3ef6..afb2d1e4 100644 --- a/_benchmark/table.js +++ b/_benchmark/table.js @@ -15,8 +15,10 @@ import {dist} from './_fixtures.js'; const parser = new ArgumentParser(); parser.add_argument('M'); +parser.add_argument('filter'); const args = parser.parse_args(); +const filter = new RegExp(args.filter, 'i'); global.range = range; global.n = args.M; global.measure = COUNTER; @@ -119,7 +121,8 @@ const fds_finger_tree = { }; const add = async (module, api, method) => { - // If (!filter.test(module.name)) return; + if (!filter.test(module.name)) return; + if (!filter.test(method)) return; const {title, methods} = await api.compile(module); suite.addFunction(`${title} #${method}`, methods[method].run, { From 0646b311c959c1be7923142de4c6c4355f5d852a Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Tue, 31 Aug 2021 21:22:52 +0200 Subject: [PATCH 19/50] :bicyclist: perf: Inline loopy code inside core/concatenate/nodes. --- src/0-core/concatenate/nodes.js | 74 +++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/src/0-core/concatenate/nodes.js b/src/0-core/concatenate/nodes.js index 4e4447bd..9ef5acd7 100644 --- a/src/0-core/concatenate/nodes.js +++ b/src/0-core/concatenate/nodes.js @@ -4,29 +4,57 @@ import {node2, node3} from '../../2-node/index.js'; export function nodes(M, list) { assert(list.length >= 3 && list.length <= 12); - const out = []; - - const n = list.length; - - let i = 0; - - switch (n % 3) { - case 1: - out.push(node2(M, list[0], list[1])); - out.push(node2(M, list[2], list[3])); - i += 4; - break; - case 2: - out.push(node2(M, list[0], list[1])); - i += 2; - break; + switch (list.length) { + case 3: + return [node3(M, list[0], list[1], list[2])]; + case 4: + return [node2(M, list[0], list[1]), node2(M, list[2], list[3])]; + case 5: + return [node3(M, list[0], list[1], list[2]), node2(M, list[3], list[4])]; + case 6: + return [ + node3(M, list[0], list[1], list[2]), + node3(M, list[3], list[4], list[5]), + ]; + case 7: + return [ + node2(M, list[0], list[1]), + node3(M, list[2], list[3], list[4]), + node2(M, list[5], list[6]), + ]; + case 8: + return [ + node3(M, list[0], list[1], list[2]), + node2(M, list[3], list[4]), + node3(M, list[5], list[6], list[7]), + ]; + case 9: + return [ + node3(M, list[0], list[1], list[2]), + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ]; + case 10: + return [ + node2(M, list[0], list[1]), + node3(M, list[2], list[3], list[4]), + node3(M, list[5], list[6], list[7]), + node2(M, list[8], list[9]), + ]; + case 11: + return [ + node2(M, list[0], list[1]), + node3(M, list[2], list[3], list[4]), + node3(M, list[5], list[6], list[7]), + node3(M, list[8], list[9], list[10]), + ]; default: - break; + assert(list.length === 12); + return [ + node3(M, list[0], list[1], list[2]), + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + node3(M, list[9], list[10], list[11]), + ]; } - - for (; i < n; i += 3) { - out.push(node3(M, list[i], list[i + 1], list[i + 2])); - } - - return out; } From 8a7772265b8c3ab2e80a9b9175c431842ab73685 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:47:10 +0200 Subject: [PATCH 20/50] :recycle: refactor(_from_small_list): Do not use default case. --- src/0-core/_fast/_from_small_list.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/0-core/_fast/_from_small_list.js b/src/0-core/_fast/_from_small_list.js index e403f444..4c813e15 100644 --- a/src/0-core/_fast/_from_small_list.js +++ b/src/0-core/_fast/_from_small_list.js @@ -3,8 +3,15 @@ import {Empty, Single, Deep} from '../../3-tree/index.js'; import {One, Two} from '../../1-digit/index.js'; import {cache} from '../measure/index.js'; +export const THRESHOLD = 3; + export function _from_small_list(M, list) { - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 3); + assert( + Number.isInteger(list.length) && + list.length >= 0 && + list.length <= THRESHOLD, + ); + // eslint-disable-next-line default-case switch (list.length) { case 0: return new Empty(M); @@ -17,7 +24,7 @@ export function _from_small_list(M, list) { new Empty(cache(M)), new One(list[1]), ); - default: + case 3: return new Deep( M, new Two(list[0], list[1]), From 814bdc0796a5fac91e8bdd14c80abfc60361d234 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:50:04 +0200 Subject: [PATCH 21/50] :recycle: refactor(Two): Implement node method. This will be used in a later commit. --- src/1-digit/2-Two.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 7162fab3..9ff80212 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -1,5 +1,5 @@ import assert from 'assert'; -import {node2, node3} from '../2-node/index.js'; +import {Node2, node2, node3} from '../2-node/index.js'; import {Split} from '../0-core/index.js'; import {Digit, One, Three} from './index.js'; @@ -40,10 +40,8 @@ Two.prototype.cons = function (value) { return new Three(value, this.a, this.b); }; -Two.prototype.node = function (_M) { - throw new Error( - 'Two should never be converted to Node2 with current implementation', - ); +Two.prototype.node = function (M) { + return new Node2(this.measure(M), this.a, this.b); }; /** From d01ee6a69b590908cd10f3176dec462804d0cd3d Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:51:16 +0200 Subject: [PATCH 22/50] :broom: cleaning(Node2,Node3): Remove dead code. --- src/2-node/2-Node2.js | 24 ------------------------ src/2-node/3-Node3.js | 24 ------------------------ 2 files changed, 48 deletions(-) diff --git a/src/2-node/2-Node2.js b/src/2-node/2-Node2.js index c6415a3f..03b40a7b 100644 --- a/src/2-node/2-Node2.js +++ b/src/2-node/2-Node2.js @@ -21,27 +21,3 @@ Node2.prototype.measure = function () { Node2.prototype.digit = function () { return new Two(this.a, this.b); }; - -Node2.prototype.head = function () { - throw new Error('trying to call head of Node2'); -}; - -Node2.prototype.last = function () { - throw new Error('trying to call last of Node2'); -}; - -Node2.prototype.init = function () { - throw new Error('trying to call init of Node2'); -}; - -Node2.prototype.tail = function () { - throw new Error('trying to call tail of Node2'); -}; - -Node2.prototype.push = function (_value) { - throw new Error('trying to call push of Node2'); -}; - -Node2.prototype.cons = function (_value) { - throw new Error('trying to call cons of Node2'); -}; diff --git a/src/2-node/3-Node3.js b/src/2-node/3-Node3.js index 940f52b8..0139abe3 100644 --- a/src/2-node/3-Node3.js +++ b/src/2-node/3-Node3.js @@ -22,27 +22,3 @@ Node3.prototype.measure = function () { Node3.prototype.digit = function () { return new Three(this.a, this.b, this.c); }; - -Node3.prototype.head = function () { - throw new Error('trying to call head of Node3'); -}; - -Node3.prototype.last = function () { - throw new Error('trying to call last of Node3'); -}; - -Node3.prototype.init = function () { - throw new Error('trying to call init of Node3'); -}; - -Node3.prototype.tail = function () { - throw new Error('trying to call tail of Node3'); -}; - -Node3.prototype.push = function (_value) { - throw new Error('trying to call push of Node3'); -}; - -Node3.prototype.cons = function (_value) { - throw new Error('trying to call cons of Node3'); -}; From 63523e275329b29ee515e3c04b0f75b4ad541765 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 14:55:50 +0200 Subject: [PATCH 23/50] :bicyclist: perf(Three): Store computed measure in digit in node method. --- src/1-digit/3-Three.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index 11993b6c..c73d7d28 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -1,5 +1,5 @@ import assert from 'assert'; -import {node2, node3} from '../2-node/index.js'; +import {node2, Node3, node3} from '../2-node/index.js'; import {Split} from '../0-core/index.js'; import {Digit, One, Two, Four} from './index.js'; @@ -46,7 +46,7 @@ Three.prototype.cons = function (value) { }; Three.prototype.node = function (M) { - return node3(M, this.a, this.b, this.c); + return new Node3(this.measure(M), this.a, this.b, this.c); }; /** From 02a97205f91f5b581c90f19bc692750fd89ac213 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:05:38 +0200 Subject: [PATCH 24/50] :bicyclist: perf(concat): Exploit implicit prototype branching. --- src/0-core/_fast/_app3.js | 22 -- src/0-core/_fast/_append_small_list.js | 18 ++ src/0-core/_fast/_from_medium_list.js | 397 ++++++++++++++++++++++++ src/0-core/_fast/_prepend_small_list.js | 18 ++ src/0-core/_fast/index.js | 1 - src/0-core/concatenate/app3.js | 28 -- src/0-core/concatenate/index.js | 2 - src/0-core/concatenate/nodes.js | 60 ---- src/1-digit/0-Digit.js | 10 - src/1-digit/1-One.js | 138 +++++++- src/1-digit/2-Two.js | 159 +++++++++- src/1-digit/3-Three.js | 153 ++++++++- src/1-digit/4-Four.js | 198 +++++++++++- src/3-tree/implementations/0-Empty.js | 28 +- src/3-tree/implementations/1-Single.js | 26 ++ src/3-tree/implementations/2-Deep.js | 40 ++- src/4-lazy/0-Lazy.js | 20 ++ 17 files changed, 1146 insertions(+), 172 deletions(-) delete mode 100644 src/0-core/_fast/_app3.js create mode 100644 src/0-core/_fast/_append_small_list.js create mode 100644 src/0-core/_fast/_from_medium_list.js create mode 100644 src/0-core/_fast/_prepend_small_list.js delete mode 100644 src/0-core/concatenate/app3.js delete mode 100644 src/0-core/concatenate/nodes.js diff --git a/src/0-core/_fast/_app3.js b/src/0-core/_fast/_app3.js deleted file mode 100644 index e832292c..00000000 --- a/src/0-core/_fast/_app3.js +++ /dev/null @@ -1,22 +0,0 @@ -import assert from 'assert'; - -import {Empty, Single, Deep} from '../../3-tree/index.js'; -import {delay} from '../../4-lazy/index.js'; -import {app3} from '../concatenate/index.js'; - -export function _app3(A, B) { - assert(A instanceof Deep); - - B = B.force(); - - if (B instanceof Empty) return A; - - if (B instanceof Single) return A.push(B.last()); - - return new Deep( - A.M, - A.left, - delay(() => app3(A.middle, A.right._nodes(A.M, B.left), B.middle)), - B.right, - ); -} diff --git a/src/0-core/_fast/_append_small_list.js b/src/0-core/_fast/_append_small_list.js new file mode 100644 index 00000000..da9e9474 --- /dev/null +++ b/src/0-core/_fast/_append_small_list.js @@ -0,0 +1,18 @@ +import assert from 'assert'; + +export default function _append_small_list(tree, list) { + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return tree; + case 1: + return tree.push(list[0]); + case 2: + return tree.push(list[0]).push(list[1]); + case 3: + return tree.push(list[0]).push(list[1]).push(list[2]); + case 4: + return tree.push(list[0]).push(list[1]).push(list[2]).push(list[3]); + } +} diff --git a/src/0-core/_fast/_from_medium_list.js b/src/0-core/_fast/_from_medium_list.js new file mode 100644 index 00000000..b1223c69 --- /dev/null +++ b/src/0-core/_fast/_from_medium_list.js @@ -0,0 +1,397 @@ +import assert from 'assert'; +import {Empty, Single, Deep} from '../../3-tree/index.js'; +import {Four, Three, Two, One} from '../../1-digit/index.js'; +import {cache} from '../measure/index.js'; +import {node2, node3} from '../../2-node/index.js'; + +function _from_11(M, list) { + assert(list.length === 11); + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Single(cache(M), node3(M, list[4], list[5], list[6])), + new Four(list[7], list[8], list[9], list[10]), + ); +} + +function _from_12(M, list) { + assert(list.length === 12); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new One(node3(M, list[3], list[4], list[5])), + new Empty(cM), + new One(node3(M, list[6], list[7], list[8])), + ), + new Three(list[9], list[10], list[11]), + ); +} + +function _from_13(M, list) { + assert(list.length === 13); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new One(node3(M, list[3], list[4], list[5])), + new Empty(cM), + new One(node3(M, list[6], list[7], list[8])), + ), + new Four(list[9], list[10], list[11], list[12]), + ); +} + +function _from_14(M, list) { + assert(list.length === 14); + const cM = cache(M); + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Deep( + cM, + new One(node3(M, list[4], list[5], list[6])), + new Empty(cM), + new One(node3(M, list[7], list[8], list[9])), + ), + new Four(list[10], list[11], list[12], list[13]), + ); +} + +function _from_15(M, list) { + assert(list.length === 15); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two(node2(M, list[3], list[4]), node2(M, list[5], list[6])), + new Empty(cM), + new Two( + node2(M, list[7], list[8]), + node3(M, list[9], list[10], list[11]), + ), + ), + new Three(list[12], list[13], list[14]), + ); +} + +function _from_16(M, list) { + assert(list.length === 16); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two(node3(M, list[3], list[4], list[5]), node2(M, list[6], list[7])), + new Empty(cM), + new Two( + node2(M, list[8], list[9]), + node3(M, list[10], list[11], list[12]), + ), + ), + new Three(list[13], list[14], list[15]), + ); +} + +function _from_17(M, list) { + assert(list.length === 17); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ), + new Empty(cM), + new Two( + node2(M, list[9], list[10]), + node3(M, list[11], list[12], list[13]), + ), + ), + new Three(list[14], list[15], list[16]), + ); +} + +function _from_18(M, list) { + assert(list.length === 18); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ), + new Empty(cM), + new Two( + node3(M, list[9], list[10], list[11]), + node3(M, list[12], list[13], list[14]), + ), + ), + new Three(list[15], list[16], list[17]), + ); +} + +function _from_19(M, list) { + assert(list.length === 19); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ), + new Empty(cM), + new Two( + node3(M, list[9], list[10], list[11]), + node3(M, list[12], list[13], list[14]), + ), + ), + new Four(list[15], list[16], list[17], list[18]), + ); +} + +function _from_20(M, list) { + assert(list.length === 20); + const cM = cache(M); + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Deep( + cM, + new Two( + node3(M, list[4], list[5], list[6]), + node3(M, list[7], list[8], list[9]), + ), + new Empty(cM), + new Two( + node3(M, list[10], list[11], list[12]), + node3(M, list[13], list[14], list[15]), + ), + ), + new Four(list[16], list[17], list[18], list[19]), + ); +} + +function _from_21(M, list) { + assert(list.length === 21); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ), + new Empty(cM), + new Three( + node3(M, list[9], list[10], list[11]), + node3(M, list[12], list[13], list[14]), + node3(M, list[15], list[16], list[17]), + ), + ), + new Three(list[18], list[19], list[20]), + ); +} + +function _from_22(M, list) { + assert(list.length === 22); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Two( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + ), + new Empty(cM), + new Three( + node3(M, list[9], list[10], list[11]), + node3(M, list[12], list[13], list[14]), + node3(M, list[15], list[16], list[17]), + ), + ), + new Four(list[18], list[19], list[20], list[21]), + ); +} + +function _from_23(M, list) { + assert(list.length === 23); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Three( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + node3(M, list[9], list[10], list[11]), + ), + new Empty(cM), + new Three( + node3(M, list[12], list[13], list[14]), + node2(M, list[15], list[16]), + node3(M, list[17], list[18], list[19]), + ), + ), + new Three(list[20], list[21], list[22]), + ); +} + +function _from_24(M, list) { + assert(list.length === 24); + const cM = cache(M); + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Deep( + cM, + new Three( + node3(M, list[3], list[4], list[5]), + node3(M, list[6], list[7], list[8]), + node3(M, list[9], list[10], list[11]), + ), + new Empty(cM), + new Three( + node3(M, list[12], list[13], list[14]), + node3(M, list[15], list[16], list[17]), + node3(M, list[18], list[19], list[20]), + ), + ), + new Three(list[21], list[22], list[23]), + ); +} + +export const THRESHOLD = 12; + +export function _from_largest_medium_list(M, list) { + assert(list.length === THRESHOLD); + return _from_12(M, list); +} + +export function _from_medium_list(M, list) { + assert( + Number.isInteger(list.length) && + list.length >= 0 && + list.length <= THRESHOLD, + ); + + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return new Empty(M); + case 1: + return new Single(M, list[0]); + case 2: + return new Deep( + M, + new One(list[0]), + new Empty(cache(M)), + new One(list[1]), + ); + case 3: + return new Deep( + M, + new Two(list[0], list[1]), + new Empty(cache(M)), + new One(list[2]), + ); + case 4: + return new Deep( + M, + new Two(list[0], list[1]), + new Empty(cache(M)), + new Two(list[2], list[3]), + ); + case 5: + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Empty(cache(M)), + new Two(list[3], list[4]), + ); + case 6: + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Empty(cache(M)), + new Three(list[3], list[4], list[5]), + ); + case 7: + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Empty(cache(M)), + new Three(list[4], list[5], list[6]), + ); + case 8: + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Empty(cache(M)), + new Four(list[4], list[5], list[6], list[7]), + ); + case 9: + return new Deep( + M, + new Three(list[0], list[1], list[2]), + new Single(cache(M), node3(M, list[3], list[4], list[5])), + new Three(list[6], list[7], list[8]), + ); + case 10: + return new Deep( + M, + new Four(list[0], list[1], list[2], list[3]), + new Single(cache(M), node3(M, list[4], list[5], list[6])), + new Three(list[7], list[8], list[9]), + ); + case 11: + return _from_11(M, list); + case 12: + return _from_12(M, list); + case 13: + return _from_13(M, list); + case 14: + return _from_14(M, list); + case 15: + return _from_15(M, list); + case 16: + return _from_16(M, list); + case 17: + return _from_17(M, list); + case 18: + return _from_18(M, list); + case 19: + return _from_19(M, list); + case 20: + return _from_20(M, list); + case 21: + return _from_21(M, list); + case 22: + return _from_22(M, list); + case 23: + return _from_23(M, list); + case 24: + return _from_24(M, list); + } +} diff --git a/src/0-core/_fast/_prepend_small_list.js b/src/0-core/_fast/_prepend_small_list.js new file mode 100644 index 00000000..387178cd --- /dev/null +++ b/src/0-core/_fast/_prepend_small_list.js @@ -0,0 +1,18 @@ +import assert from 'assert'; + +export default function _prepend_small_list(tree, list) { + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return tree; + case 1: + return tree.cons(list[0]); + case 2: + return tree.cons(list[1]).cons(list[0]); + case 3: + return tree.cons(list[2]).cons(list[1]).cons(list[0]); + case 4: + return tree.cons(list[3]).cons(list[2]).cons(list[1]).cons(list[0]); + } +} diff --git a/src/0-core/_fast/index.js b/src/0-core/_fast/index.js index 4cf4860d..193f69c4 100644 --- a/src/0-core/_fast/index.js +++ b/src/0-core/_fast/index.js @@ -1,4 +1,3 @@ -export * from './_app3.js'; export * from './_append.js'; export * from './_deepL.js'; export * from './_deepR.js'; diff --git a/src/0-core/concatenate/app3.js b/src/0-core/concatenate/app3.js deleted file mode 100644 index 5bcdf632..00000000 --- a/src/0-core/concatenate/app3.js +++ /dev/null @@ -1,28 +0,0 @@ -import assert from 'assert'; - -import {Tree, Empty, Single, Deep} from '../../3-tree/index.js'; -import {delay} from '../../4-lazy/index.js'; -import {_prepend, _append} from '../_fast/index.js'; - -export function app3(A, list, B) { - assert(A instanceof Tree); - assert(B instanceof Tree); - - A = A.force(); - B = B.force(); - - if (A instanceof Empty) return _prepend(B, list); - if (B instanceof Empty) return _append(A, list); - - if (A instanceof Single) return _prepend(B, list).cons(A.head()); - if (B instanceof Single) return _append(A, list).push(B.last()); - - return new Deep( - A.M, - A.left, - delay(() => - app3(A.middle, A.right._nodes_with_list(A.M, list, B.left), B.middle), - ), - B.right, - ); -} diff --git a/src/0-core/concatenate/index.js b/src/0-core/concatenate/index.js index 4300e18f..33f50afe 100644 --- a/src/0-core/concatenate/index.js +++ b/src/0-core/concatenate/index.js @@ -1,5 +1,3 @@ -export * from './app3.js'; export * from './append.js'; export * from './from.js'; -export * from './nodes.js'; export * from './prepend.js'; diff --git a/src/0-core/concatenate/nodes.js b/src/0-core/concatenate/nodes.js deleted file mode 100644 index 9ef5acd7..00000000 --- a/src/0-core/concatenate/nodes.js +++ /dev/null @@ -1,60 +0,0 @@ -import assert from 'assert'; - -import {node2, node3} from '../../2-node/index.js'; - -export function nodes(M, list) { - assert(list.length >= 3 && list.length <= 12); - switch (list.length) { - case 3: - return [node3(M, list[0], list[1], list[2])]; - case 4: - return [node2(M, list[0], list[1]), node2(M, list[2], list[3])]; - case 5: - return [node3(M, list[0], list[1], list[2]), node2(M, list[3], list[4])]; - case 6: - return [ - node3(M, list[0], list[1], list[2]), - node3(M, list[3], list[4], list[5]), - ]; - case 7: - return [ - node2(M, list[0], list[1]), - node3(M, list[2], list[3], list[4]), - node2(M, list[5], list[6]), - ]; - case 8: - return [ - node3(M, list[0], list[1], list[2]), - node2(M, list[3], list[4]), - node3(M, list[5], list[6], list[7]), - ]; - case 9: - return [ - node3(M, list[0], list[1], list[2]), - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ]; - case 10: - return [ - node2(M, list[0], list[1]), - node3(M, list[2], list[3], list[4]), - node3(M, list[5], list[6], list[7]), - node2(M, list[8], list[9]), - ]; - case 11: - return [ - node2(M, list[0], list[1]), - node3(M, list[2], list[3], list[4]), - node3(M, list[5], list[6], list[7]), - node3(M, list[8], list[9], list[10]), - ]; - default: - assert(list.length === 12); - return [ - node3(M, list[0], list[1], list[2]), - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - node3(M, list[9], list[10], list[11]), - ]; - } -} diff --git a/src/1-digit/0-Digit.js b/src/1-digit/0-Digit.js index 1be2134c..29d66754 100644 --- a/src/1-digit/0-Digit.js +++ b/src/1-digit/0-Digit.js @@ -1,15 +1,5 @@ -import {nodes} from '../0-core/index.js'; - export function Digit() {} -Digit.prototype._concat = function (list, other) { - return this._list().concat(list).concat(other._list()); -}; - -Digit.prototype._nodes_with_list = function (M, list, other) { - return nodes(M, this._concat(list, other)); -}; - Digit.prototype[Symbol.iterator] = function () { return this._list()[Symbol.iterator](); }; diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 254ddce7..852c2ca5 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -1,7 +1,7 @@ import assert from 'assert'; import {node2, node3} from '../2-node/index.js'; import {Split} from '../0-core/index.js'; -import {Digit, Two, Three} from './index.js'; +import {Digit, Two, Three, Four} from './index.js'; export function One(a) { this.a = a; @@ -52,12 +52,136 @@ One.prototype.splitDigit = function (p, i, M) { }; One.prototype._nodes = function (M, other) { - if (other instanceof One) return [node2(M, this.a, other.a)]; - if (other instanceof Two) return [node3(M, this.a, other.a, other.b)]; - if (other instanceof Three) - return [node2(M, this.a, other.a), node2(M, other.b, other.c)]; - assert(other instanceof Digit); - return [node3(M, this.a, other.a, other.b), node2(M, other.c, other.d)]; + return other._nodes_with_one(M, this); +}; + +One.prototype._nodes_with_one = function (M, other) { + assert(other instanceof One); + return [node2(M, other.a, this.a)]; +}; + +One.prototype._nodes_with_two = function (M, other) { + assert(other instanceof Two); + return [node3(M, other.a, other.b, this.a)]; +}; + +One.prototype._nodes_with_three = function (M, other) { + assert(other instanceof Three); + return [node2(M, other.a, other.b), node2(M, other.c, this.a)]; +}; + +One.prototype._nodes_with_four = function (M, other) { + assert(other instanceof Four); + return [node3(M, other.a, other.b, other.c), node2(M, other.d, this.a)]; +}; + +One.prototype._nodes_with_list = function (M, list, other) { + return other._nodes_with_list_and_one(M, list, this); +}; + +One.prototype._nodes_with_list_and_one = function (M, list, other) { + assert(other instanceof One); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node2(M, other.a, this.a)]; + case 1: + return [node3(M, other.a, list[0], this.a)]; + case 2: + return [node2(M, other.a, list[0]), node2(M, list[1], this.a)]; + case 3: + return [node3(M, other.a, list[0], list[1]), node2(M, list[2], this.a)]; + case 4: + return [ + node3(M, other.a, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; + } +}; + +One.prototype._nodes_with_list_and_two = function (M, list, other) { + assert(other instanceof Two); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node3(M, other.a, other.b, this.a)]; + case 1: + return [other.node(M), node2(M, list[0], this.a)]; + case 2: + return [other.node(M), node3(M, list[0], list[1], this.a)]; + case 3: + return [ + node3(M, other.a, other.b, list[0]), + node3(M, list[1], list[2], this.a), + ]; + case 4: + return [ + other.node(M), + node3(M, list[0], list[1], list[2]), + node2(M, list[3], this.a), + ]; + } +}; + +One.prototype._nodes_with_list_and_three = function (M, list, other) { + assert(other instanceof Three); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node2(M, other.a, other.b), node2(M, other.c, this.a)]; + case 1: + return [other.node(M), node2(M, list[0], this.a)]; + case 2: + return [other.node(M), node3(M, list[0], list[1], this.a)]; + case 3: + return [ + other.node(M), + node2(M, list[0], list[1]), + node2(M, list[2], this.a), + ]; + case 4: + return [ + other.node(M), + node2(M, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; + } +}; + +One.prototype._nodes_with_list_and_four = function (M, list, other) { + assert(other instanceof Four); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node3(M, other.a, other.b, other.c), node2(M, other.d, this.a)]; + case 1: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], this.a), + ]; + case 2: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node2(M, list[1], this.a), + ]; + case 3: + return [ + node3(M, other.a, other.b, other.c), + node2(M, other.d, list[0]), + node3(M, list[1], list[2], this.a), + ]; + case 4: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; + } }; One.prototype._list = function () { diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 9ff80212..e824d311 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -1,7 +1,7 @@ import assert from 'assert'; import {Node2, node2, node3} from '../2-node/index.js'; import {Split} from '../0-core/index.js'; -import {Digit, One, Three} from './index.js'; +import {Digit, One, Three, Four} from './index.js'; export function Two(a, b) { this.a = a; @@ -55,18 +55,159 @@ Two.prototype.splitDigit = function (p, i, M) { }; Two.prototype._nodes = function (M, other) { - if (other instanceof One) return [node3(M, this.a, this.b, other.a)]; - if (other instanceof Two) - return [node2(M, this.a, this.b), node2(M, other.a, other.b)]; - if (other instanceof Three) - return [node3(M, this.a, this.b, other.a), node2(M, other.b, other.c)]; - assert(other instanceof Digit); + return other._nodes_with_two(M, this); +}; + +Two.prototype._nodes_with_one = function (M, other) { + assert(other instanceof One); + return [node3(M, other.a, this.a, this.b)]; +}; + +Two.prototype._nodes_with_two = function (M, other) { + assert(other instanceof Two); + return [node2(M, other.a, other.b), node2(M, this.a, this.b)]; +}; + +Two.prototype._nodes_with_three = function (M, other) { + assert(other instanceof Three); + return [node3(M, other.a, other.b, other.c), node2(M, this.a, this.b)]; +}; + +Two.prototype._nodes_with_four = function (M, other) { + assert(other instanceof Four); return [ - node3(M, this.a, this.b, other.a), - node3(M, other.b, other.c, other.d), + node3(M, other.a, other.b, other.c), + node3(M, other.d, this.a, this.b), ]; }; +Two.prototype._nodes_with_list = function (M, list, other) { + return other._nodes_with_list_and_two(M, list, this); +}; + +Two.prototype._nodes_with_list_and_one = function (M, list, other) { + assert(other instanceof One); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node3(M, other.a, this.a, this.b)]; + case 1: + return [node2(M, other.a, list[0]), this.node(M)]; + case 2: + return [node3(M, other.a, list[0], list[1]), this.node(M)]; + case 3: + return [ + node2(M, other.a, list[0]), + node2(M, list[1], list[2]), + this.node(M), + ]; + case 4: + return [ + node2(M, other.a, list[0]), + node3(M, list[1], list[2], list[3]), + this.node(M), + ]; + } +}; + +Two.prototype._nodes_with_list_and_two = function (M, list, other) { + assert(other instanceof Two); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node2(M, other.a, other.b), node2(M, this.a, this.b)]; + case 1: + return [node3(M, other.a, other.b, list[0]), node2(M, this.a, this.b)]; + case 2: + return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + case 3: + return [ + node2(M, other.a, other.b), + node3(M, list[0], list[1], list[2]), + node2(M, this.a, this.b), + ]; + case 4: + return [ + node3(M, other.a, other.b, list[0]), + node2(M, list[1], list[2]), + node3(M, list[3], this.a, this.b), + ]; + } +}; + +Two.prototype._nodes_with_list_and_three = function (M, list, other) { + assert(other instanceof Three); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node3(M, other.a, other.b, other.c), node2(M, this.a, this.b)]; + case 1: + return [ + node3(M, other.a, other.b, other.c), + node3(M, list[0], this.a, this.b), + ]; + case 2: + return [ + node2(M, other.a, other.b), + node3(M, other.c, list[0], list[1]), + node2(M, this.a, this.b), + ]; + case 3: + return [ + node3(M, other.a, other.b, other.c), + node2(M, list[0], list[1]), + node3(M, list[2], this.a, this.b), + ]; + case 4: + return [ + node3(M, other.a, other.b, other.c), + node3(M, list[0], list[1], list[2]), + node3(M, list[3], this.a, this.b), + ]; + } +}; + +Two.prototype._nodes_with_list_and_four = function (M, list, other) { + assert(other instanceof Four); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, this.a, this.b), + ]; + case 1: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node2(M, this.a, this.b), + ]; + case 2: + return [ + node3(M, other.a, other.b, other.c), + node2(M, other.d, list[0]), + node3(M, list[1], this.a, this.b), + ]; + case 3: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + node3(M, list[2], this.a, this.b), + ]; + case 4: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node3(M, list[1], list[2], list[3]), + node2(M, this.a, this.b), + ]; + } +}; + Two.prototype._list = function () { return [this.a, this.b]; }; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index c73d7d28..de129195 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -62,21 +62,146 @@ Three.prototype.splitDigit = function (p, i, M) { }; Three.prototype._nodes = function (M, other) { - if (other instanceof One) - return [node2(M, this.a, this.b), node2(M, this.c, other.a)]; - if (other instanceof Two) - return [node3(M, this.a, this.b, this.c), node2(M, other.a, other.b)]; - if (other instanceof Three) - return [ - node3(M, this.a, this.b, this.c), - node3(M, other.a, other.b, other.c), - ]; + return other._nodes_with_three(M, this); +}; + +Three.prototype._nodes_with_one = function (M, other) { + assert(other instanceof One); + return [node2(M, other.a, this.a), node2(M, this.b, this.c)]; +}; + +Three.prototype._nodes_with_two = function (M, other) { + assert(other instanceof Two); + return [other.node(M), this.node(M)]; +}; + +Three.prototype._nodes_with_three = function (M, other) { + assert(other instanceof Three); + return [other.node(M), this.node(M)]; +}; + +Three.prototype._nodes_with_four = function (M, other) { + assert(other instanceof Four); + return [node2(M, other.a, other.b), node2(M, other.c, other.d), this.node(M)]; +}; + +Three.prototype._nodes_with_list = function (M, list, other) { + return other._nodes_with_list_and_three(M, list, this); +}; + +Three.prototype._nodes_with_list_and_one = function (M, list, other) { + assert(other instanceof One); + assert(list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node2(M, other.a, this.a), node2(M, this.b, this.c)]; + case 1: + return [node2(M, other.a, list[0]), this.node(M)]; + case 2: + return [node3(M, other.a, list[0], list[1]), this.node(M)]; + case 3: + return [ + node2(M, other.a, list[0]), + node2(M, list[1], list[2]), + this.node(M), + ]; + case 4: + return [ + node3(M, other.a, list[0], list[1]), + node2(M, list[2], list[3]), + this.node(M), + ]; + } +}; + +Three.prototype._nodes_with_list_and_two = function (M, list, other) { + assert(other instanceof Two); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [other.node(M), this.node(M)]; + case 1: + return [node3(M, other.a, other.b, list[0]), this.node(M)]; + case 2: + return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + case 3: + return [other.node(M), node3(M, list[0], list[1], list[2]), this.node(M)]; + case 4: + return [ + node3(M, other.a, other.b, list[0]), + node3(M, list[1], list[2], list[3]), + this.node(M), + ]; + } +}; + +Three.prototype._nodes_with_list_and_three = function (M, list, other) { + assert(other instanceof Three); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [other.node(M), this.node(M)]; + case 1: + return [ + node2(M, other.a, other.b), + node2(M, other.c, list[0]), + this.node(M), + ]; + case 2: + return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + case 3: + return [other.node(M), node3(M, list[0], list[1], list[2]), this.node(M)]; + case 4: + return [ + other.node(M), + node2(M, list[0], list[1]), + node2(M, list[2], list[3]), + this.node(M), + ]; + } +}; + +Three.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); - return [ - node3(M, this.a, this.b, this.c), - node2(M, other.a, other.b), - node2(M, other.c, other.d), - ]; + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [ + node2(M, other.a, other.b), + node2(M, other.c, other.d), + this.node(M), + ]; + case 1: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + this.node(M), + ]; + case 2: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + this.node(M), + ]; + case 3: + return [ + node2(M, other.a, other.b), + node2(M, other.c, other.d), + node3(M, list[0], list[1], list[2]), + this.node(M), + ]; + case 4: + return [ + node3(M, other.a, other.b, other.c), + node2(M, other.d, list[0]), + node3(M, list[1], list[2], list[3]), + this.node(M), + ]; + } }; Three.prototype._list = function () { diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 8814d46b..3e03cd7b 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -65,27 +65,193 @@ Four.prototype.splitDigit = function (p, i, M) { }; Four.prototype._nodes = function (M, other) { - if (other instanceof One) - return [node3(M, this.a, this.b, this.c), node2(M, this.d, other.a)]; - if (other instanceof Two) - return [ - node3(M, this.a, this.b, this.c), - node3(M, this.d, other.a, other.b), - ]; - if (other instanceof Three) - return [ - node3(M, this.a, this.b, this.c), - node2(M, this.d, other.a), - node2(M, other.b, other.c), - ]; + return other._nodes_with_four(M, this); +}; + +Four.prototype._nodes_with_one = function (M, other) { + assert(other instanceof One); + return [node3(M, other.a, this.a, this.b), node2(M, this.c, this.d)]; +}; + +Four.prototype._nodes_with_two = function (M, other) { + assert(other instanceof Two); + return [node3(M, other.a, other.b, this.a), node3(M, this.b, this.c, this.d)]; +}; + +Four.prototype._nodes_with_three = function (M, other) { + assert(other instanceof Three); + return [ + node3(M, other.a, other.b, other.c), + node2(M, this.a, this.b), + node2(M, this.c, this.d), + ]; +}; + +Four.prototype._nodes_with_four = function (M, other) { assert(other instanceof Four); return [ - node3(M, this.a, this.b, this.c), - node3(M, this.d, other.a, other.b), - node2(M, other.c, other.d), + node3(M, other.a, other.b, other.c), + node2(M, other.d, this.a), + node3(M, this.b, this.c, this.d), ]; }; +Four.prototype._nodes_with_list = function (M, list, other) { + return other._nodes_with_list_and_four(M, list, this); +}; + +Four.prototype._nodes_with_list_and_one = function (M, list, other) { + assert(other instanceof One); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [node3(M, other.a, this.a, this.b), node2(M, this.c, this.d)]; + case 1: + return [ + node3(M, other.a, list[0], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 2: + return [ + node2(M, other.a, list[0]), + node3(M, list[1], this.a, this.b), + node2(M, this.c, this.d), + ]; + case 3: + return [ + node3(M, other.a, list[0], list[1]), + node2(M, list[2], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 4: + return [ + node3(M, other.a, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; + } +}; + +Four.prototype._nodes_with_list_and_two = function (M, list, other) { + assert(other instanceof Two); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [ + node3(M, other.a, other.b, this.a), + node3(M, this.b, this.c, this.d), + ]; + case 1: + return [ + other.node(M), + node3(M, list[0], this.a, this.b), + node2(M, this.c, this.d), + ]; + case 2: + return [ + other.node(M), + node3(M, list[0], list[1], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 3: + return [ + node3(M, other.a, other.b, list[0]), + node3(M, list[1], list[2], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 4: + return [ + other.node(M), + node3(M, list[0], list[1], list[2]), + node3(M, list[3], this.a, this.b), + node2(M, this.c, this.d), + ]; + } +}; + +Four.prototype._nodes_with_list_and_three = function (M, list, other) { + assert(other instanceof Three); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [ + other.node(M), + node2(M, this.a, this.b), + node2(M, this.c, this.d), + ]; + case 1: + return [ + other.node(M), + node2(M, list[0], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 2: + return [ + other.node(M), + node3(M, list[0], list[1], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 3: + return [ + other.node(M), + node2(M, list[0], list[1]), + node2(M, list[2], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 4: + return [ + other.node(M), + node2(M, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; + } +}; + +Four.prototype._nodes_with_list_and_four = function (M, list, other) { + assert(other instanceof Four); + assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + // eslint-disable-next-line default-case + switch (list.length) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node2(M, other.d, this.a), + node3(M, this.b, this.c, this.d), + ]; + case 1: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 2: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node3(M, list[1], this.a, this.b), + node2(M, this.c, this.d), + ]; + case 3: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node3(M, list[1], list[2], this.a), + node3(M, this.b, this.c, this.d), + ]; + case 4: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; + } +}; + Four.prototype._list = function () { return [this.a, this.b, this.c, this.d]; }; diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index 0d71bb15..7dd79bb2 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -1,6 +1,9 @@ +import assert from 'assert'; import {Tree} from '../base/index.js'; import {_EMPTY} from '../../0-core/index.js'; -import {Single} from './index.js'; +import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; +import _append_small_list from '../../0-core/_fast/_append_small_list.js'; +import {Single, Deep} from './index.js'; export function Empty(M) { this.M = M; @@ -61,3 +64,26 @@ Empty.prototype.splitTree = function (_p, _i) { Empty.prototype.split = function (_p) { return [this, this]; }; + +Empty.prototype._concat_with_deep = function (other) { + assert(other instanceof Deep); + return other; +}; + +Empty.prototype._app3 = function (list, other) { + assert(other instanceof Tree); + return other._app3_with_empty(list); +}; + +Empty.prototype._app3_with_empty = function (list) { + return _from_medium_list(this.M, list); +}; + +Empty.prototype._app3_with_single = function (list, value) { + return _from_medium_list(this.M, list).cons(value); +}; + +Empty.prototype._app3_with_deep = function (list, other) { + assert(other instanceof Deep); + return _append_small_list(other, list); +}; diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 58e8d633..379b2b53 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -1,6 +1,9 @@ +import assert from 'assert'; import {Tree} from '../base/index.js'; import {cache, Split} from '../../0-core/index.js'; import {One} from '../../1-digit/index.js'; +import _append_small_list from '../../0-core/_fast/_append_small_list.js'; +import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import {Empty, Deep} from './index.js'; export function Single(M, value) { @@ -75,3 +78,26 @@ Single.prototype.split = function (p) { ? [new Empty(this.M), this] : [this, new Empty(this.M)]; }; + +Single.prototype._concat_with_deep = function (other) { + assert(other instanceof Deep); + return other.push(this.a); +}; + +Single.prototype._app3 = function (list, other) { + assert(other instanceof Tree); + return other._app3_with_single(list, this.a); +}; + +Single.prototype._app3_with_empty = function (list) { + return _from_medium_list(this.M, list).push(this.a); +}; + +Single.prototype._app3_with_single = function (list, value) { + return _from_medium_list(this.M, list).push(this.a).cons(value); +}; + +Single.prototype._app3_with_deep = function (list, other) { + assert(other instanceof Deep); + return _append_small_list(other, list).push(this.a); +}; diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index f17676cd..00a4bda9 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -1,7 +1,6 @@ import assert from 'assert'; import {Tree} from '../base/index.js'; import { - _app3, _from_digit, _from_small_list, _deepL, @@ -11,6 +10,7 @@ import { } from '../../0-core/index.js'; import {One, Two, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; +import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import {Empty} from './index.js'; export function Deep(M, left, middle, right) { @@ -110,7 +110,7 @@ Deep.prototype.push = function (value) { }; Deep.prototype.concat = function (other) { - return _app3(this, other); + return other._concat_with_deep(this); }; Deep.prototype[Symbol.iterator] = function* () { @@ -177,3 +177,39 @@ Deep.prototype.split = function (p) { return [this, new Empty(this.M)]; }; + +Deep.prototype._concat_with_deep = function (other) { + assert(other instanceof Deep); + return new Deep( + this.M, + other.left, + other.middle._app3(other.right._nodes(this.M, this.left), this.middle), + this.right, + ); +}; + +Deep.prototype._app3 = function (list, other) { + assert(other instanceof Tree); + return other._app3_with_deep(list, this); +}; + +Deep.prototype._app3_with_empty = function (list) { + return _prepend_small_list(this, list); +}; + +Deep.prototype._app3_with_single = function (list, value) { + return _prepend_small_list(this, list).cons(value); +}; + +Deep.prototype._app3_with_deep = function (list, other) { + assert(other instanceof Deep); + return new Deep( + this.M, + other.left, + other.middle._app3( + other.right._nodes_with_list(this.M, list, this.left), + this.middle, + ), + this.right, + ); +}; diff --git a/src/4-lazy/0-Lazy.js b/src/4-lazy/0-Lazy.js index 797194cc..88162e6e 100644 --- a/src/4-lazy/0-Lazy.js +++ b/src/4-lazy/0-Lazy.js @@ -67,3 +67,23 @@ Lazy.prototype[Symbol.iterator] = function () { Lazy.prototype.reversed = function () { return this.force().reversed(); }; + +Lazy.prototype._concat_with_deep = function (other) { + return this.force()._concat_with_deep(other); +}; + +Lazy.prototype._app3 = function (list, other) { + return this.force()._app3(list, other); +}; + +Lazy.prototype._app3_with_empty = function (list) { + return this.force()._app3_with_empty(list); +}; + +Lazy.prototype._app3_with_single = function (list, value) { + return this.force()._app3_with_single(list, value); +}; + +Lazy.prototype._app3_with_deep = function (list, other) { + return this.force()._app3_with_deep(list, other); +}; From 31566987b5c319f83fb2eb3e34fa456e7ff21995 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:11:08 +0200 Subject: [PATCH 25/50] :bicyclist: perf(from): Use concatenation of medium-sized trees. --- src/0-core/_fast/_from_iterable.js | 57 ++++++++++++++++++++++++++++++ src/0-core/concatenate/from.js | 4 +-- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 src/0-core/_fast/_from_iterable.js diff --git a/src/0-core/_fast/_from_iterable.js b/src/0-core/_fast/_from_iterable.js new file mode 100644 index 00000000..fd3a22fd --- /dev/null +++ b/src/0-core/_fast/_from_iterable.js @@ -0,0 +1,57 @@ +// Import {Empty} from '../../3-tree/index.js'; + +import {Empty} from '../../3-tree/implementations/0-Empty.js'; +import { + THRESHOLD as MEDIUM_THRESHOLD, + _from_medium_list, + _from_largest_medium_list, +} from './_from_medium_list.js'; + +function increment(trees, tree) { + // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc + const n = trees.length | 0; + // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc + for (let i = 0; i !== n; i = (i + 1) | 0) { + if (trees[i] === null) { + trees[i] = tree; + return; + } + + tree = trees[i].concat(tree); + trees[i] = null; + } + + trees.push(tree); +} + +function sum(M, trees) { + let result = new Empty(M); + for (const tree of trees) { + if (tree !== null) { + result = tree.concat(result); + } + } + + return result; +} + +export function _from_iterable(M, iterable) { + // Return new Empty(M).append(iterable); + const it = iterable[Symbol.iterator](); + const trees = []; + for (;;) { + const list = []; + // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc + for (let i = MEDIUM_THRESHOLD; i !== 0; i = (i - 1) | 0) { + const event = it.next(); + if (event.done) { + increment(trees, _from_medium_list(M, list)); + return sum(M, trees); + } + + list.push(event.value); + } + + increment(trees, _from_largest_medium_list(M, list)); + } +} diff --git a/src/0-core/concatenate/from.js b/src/0-core/concatenate/from.js index 106b45a4..20aa8a53 100644 --- a/src/0-core/concatenate/from.js +++ b/src/0-core/concatenate/from.js @@ -1,5 +1,5 @@ -import {Empty} from '../../3-tree/index.js'; +import {_from_iterable} from '../_fast/_from_iterable.js'; export function from(M, iterable) { - return new Empty(M).append(iterable); + return _from_iterable(M, iterable); } From d54d8da28c3f910b4cf9955777114dcb7cdb4007 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:16:21 +0200 Subject: [PATCH 26/50] :bicyclist: perf(append): Skip one tree level. --- src/0-core/_fast/_fill_right.js | 71 ++++++++++++++++++++++++++ src/0-core/_fast/_from_by_filling.js | 22 ++++++++ src/3-tree/base/Tree.js | 8 +-- src/3-tree/implementations/0-Empty.js | 5 ++ src/3-tree/implementations/1-Single.js | 14 +++++ src/3-tree/implementations/2-Deep.js | 17 ++++++ src/4-lazy/0-Lazy.js | 4 ++ 7 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 src/0-core/_fast/_fill_right.js create mode 100644 src/0-core/_fast/_from_by_filling.js diff --git a/src/0-core/_fast/_fill_right.js b/src/0-core/_fast/_fill_right.js new file mode 100644 index 00000000..bf28cbdc --- /dev/null +++ b/src/0-core/_fast/_fill_right.js @@ -0,0 +1,71 @@ +import assert from 'assert'; + +import {One} from '../../1-digit/1-One.js'; +import {Two} from '../../1-digit/2-Two.js'; +import {Three} from '../../1-digit/3-Three.js'; +import {Four} from '../../1-digit/4-Four.js'; +import {node3} from '../../2-node/node3.js'; +import {Empty} from '../../3-tree/implementations/0-Empty.js'; +import {Single} from '../../3-tree/implementations/1-Single.js'; +import {Deep} from '../../3-tree/implementations/2-Deep.js'; +import {Lazy} from '../../4-lazy/0-Lazy.js'; + +/** + * _fill_right. + * + * @param {any} M + * @param {One|Two|Three|Four} left + * @param {Empty|Single|Deep|Lazy} middle + * @param {any} x1 + * @param {Iterator} iterator + * @return {Deep} + */ +export default function _fill_right(M, left, middle, x1, iterator) { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert( + middle instanceof Empty || + middle instanceof Single || + middle instanceof Deep || + middle instanceof Lazy, + ); + let event; + let x2; + let x3; + let y1; + let y2; + let y3; + for (;;) { + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new One(x1)); + x2 = event.value; + + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new Two(x1, x2)); + x3 = event.value; + + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new Three(x1, x2, x3)); + y1 = event.value; + + middle = middle.push(node3(M, x1, x2, x3)); + + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new One(y1)); + y2 = event.value; + + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new Two(y1, y2)); + y3 = event.value; + + event = iterator.next(); + if (event.done) return new Deep(M, left, middle, new Three(y1, y2, y3)); + x1 = event.value; + + middle = middle.push(node3(M, y1, y2, y3)); + } +} diff --git a/src/0-core/_fast/_from_by_filling.js b/src/0-core/_fast/_from_by_filling.js new file mode 100644 index 00000000..7daa57e1 --- /dev/null +++ b/src/0-core/_fast/_from_by_filling.js @@ -0,0 +1,22 @@ +import {One} from '../../1-digit/1-One.js'; +import {Empty} from '../../3-tree/implementations/0-Empty.js'; +import {Single} from '../../3-tree/implementations/1-Single.js'; +import {cache} from '../measure/cache.js'; +import _fill_right from './_fill_right.js'; + +export default function _form_by_filling(M, iterable) { + const it = iterable[Symbol.iterator](); + + let event = it.next(); + if (event.done) return new Empty(M); + const a = event.value; + + event = it.next(); + if (event.done) return new Single(M, a); + const b = event.value; + + const left = new One(a); + const middle = new Empty(cache(M)); + + return _fill_right(M, left, middle, b, it); +} diff --git a/src/3-tree/base/Tree.js b/src/3-tree/base/Tree.js index 0d4a47e7..d4fe1fc1 100644 --- a/src/3-tree/base/Tree.js +++ b/src/3-tree/base/Tree.js @@ -1,4 +1,4 @@ -import {append, prepend} from '../../0-core/index.js'; +import {prepend} from '../../0-core/index.js'; /** * Base class for all implementations. @@ -76,9 +76,9 @@ Tree.prototype.dropUntil = function (predicate) { * * @returns {Tree} The output tree. */ -Tree.prototype.append = function (iterable) { - return append(this, iterable); -}; +// Tree.prototype.append = function (iterable) { +// return append(this, iterable); +// }; /** * Returns a tree that contains all values of the input iterable in-order diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index 7dd79bb2..d5d25165 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -3,6 +3,7 @@ import {Tree} from '../base/index.js'; import {_EMPTY} from '../../0-core/index.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; +import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import {Single, Deep} from './index.js'; export function Empty(M) { @@ -44,6 +45,10 @@ Empty.prototype.cons = function (value) { return new Single(this.M, value); }; +Empty.prototype.append = function (iterable) { + return _from_by_filling(this.M, iterable); +}; + Empty.prototype.concat = function (other) { return other; }; diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 379b2b53..837c15d4 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -4,6 +4,7 @@ import {cache, Split} from '../../0-core/index.js'; import {One} from '../../1-digit/index.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; +import _fill_right from '../../0-core/_fast/_fill_right.js'; import {Empty, Deep} from './index.js'; export function Single(M, value) { @@ -56,6 +57,19 @@ Single.prototype.push = function (value) { ); }; +Single.prototype.append = function (iterable) { + const it = iterable[Symbol.iterator](); + + const event = it.next(); + if (event.done) return this; + const x1 = event.value; + + const left = new One(this.a); + const middle = new Empty(cache(this.M)); + + return _fill_right(this.M, left, middle, x1, it); +}; + Single.prototype.concat = function (other) { return other.cons(this.a); }; diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 00a4bda9..6363679c 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -11,6 +11,7 @@ import { import {One, Two, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; +import _fill_right from '../../0-core/_fast/_fill_right.js'; import {Empty} from './index.js'; export function Deep(M, left, middle, right) { @@ -109,6 +110,22 @@ Deep.prototype.push = function (value) { return new Deep(this.M, this.left, this.middle, this.right.push(value)); }; +Deep.prototype.append = function (iterable) { + const it = iterable[Symbol.iterator](); + + let event = it.next(); + if (event.done) return this; + const a = event.value; + + event = it.next(); + if (event.done) return this.push(a); + const b = event.value; + + const middle = this.middle.push(this.right._nodes(this.M, new One(a))); + + return _fill_right(this.M, this.left, middle, b, it); +}; + Deep.prototype.concat = function (other) { return other._concat_with_deep(this); }; diff --git a/src/4-lazy/0-Lazy.js b/src/4-lazy/0-Lazy.js index 88162e6e..d7158b67 100644 --- a/src/4-lazy/0-Lazy.js +++ b/src/4-lazy/0-Lazy.js @@ -56,6 +56,10 @@ Lazy.prototype.split = function (p) { return this.force().split(p); }; +Lazy.prototype.append = function (iterable) { + return this.force().append(iterable); +}; + Lazy.prototype.concat = function (other) { return this.force().concat(other); }; From 960963f64a507b5e70753382556beb56fe62e298 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:20:42 +0200 Subject: [PATCH 27/50] :adhesive_bandage: fix(Deep#append): Make it work. --- src/3-tree/implementations/2-Deep.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 6363679c..22fb2289 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -12,6 +12,7 @@ import {One, Two, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; +import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {Empty} from './index.js'; export function Deep(M, left, middle, right) { @@ -121,7 +122,11 @@ Deep.prototype.append = function (iterable) { if (event.done) return this.push(a); const b = event.value; - const middle = this.middle.push(this.right._nodes(this.M, new One(a))); + // TODO simplify + const middle = _append_small_list( + this.middle, + this.right._nodes(this.M, new One(a)), + ); return _fill_right(this.M, this.left, middle, b, it); }; From be4f1f305550536a0cc043c22f97493c24f5d735 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:26:19 +0200 Subject: [PATCH 28/50] :recycle: refactor: Add assertions and remove unreachable code. --- src/0-core/_fast/_append_small_list.js | 4 +--- src/0-core/_fast/_digit.js | 3 ++- src/0-core/_fast/_prepend_small_list.js | 4 +--- src/1-digit/1-One.js | 16 ++++----------- src/1-digit/2-Two.js | 19 ++++------------- src/1-digit/3-Three.js | 20 ++++-------------- src/1-digit/4-Four.js | 27 ++++--------------------- src/3-tree/implementations/0-Empty.js | 4 ++++ src/3-tree/implementations/1-Single.js | 4 ++++ src/3-tree/implementations/2-Deep.js | 4 ++++ src/_debug/isSameMeasure.js | 6 ++++++ src/_debug/underlyingMeasure.js | 5 +++++ 12 files changed, 43 insertions(+), 73 deletions(-) create mode 100644 src/_debug/isSameMeasure.js create mode 100644 src/_debug/underlyingMeasure.js diff --git a/src/0-core/_fast/_append_small_list.js b/src/0-core/_fast/_append_small_list.js index da9e9474..13aa4b63 100644 --- a/src/0-core/_fast/_append_small_list.js +++ b/src/0-core/_fast/_append_small_list.js @@ -1,11 +1,9 @@ import assert from 'assert'; export default function _append_small_list(tree, list) { - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return tree; case 1: return tree.push(list[0]); case 2: diff --git a/src/0-core/_fast/_digit.js b/src/0-core/_fast/_digit.js index 310224c9..8c448a02 100644 --- a/src/0-core/_fast/_digit.js +++ b/src/0-core/_fast/_digit.js @@ -12,12 +12,13 @@ import {One, Two, Three} from '../../1-digit/index.js'; */ export function _digit(list) { assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 3); + // eslint-disable-next-line default-case switch (list.length) { case 1: return new One(list[0]); case 2: return new Two(list[0], list[1]); - default: + case 3: return new Three(list[0], list[1], list[2]); } } diff --git a/src/0-core/_fast/_prepend_small_list.js b/src/0-core/_fast/_prepend_small_list.js index 387178cd..77097959 100644 --- a/src/0-core/_fast/_prepend_small_list.js +++ b/src/0-core/_fast/_prepend_small_list.js @@ -1,11 +1,9 @@ import assert from 'assert'; export default function _prepend_small_list(tree, list) { - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return tree; case 1: return tree.cons(list[0]); case 2: diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 852c2ca5..6d714b4d 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -81,11 +81,9 @@ One.prototype._nodes_with_list = function (M, list, other) { One.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node2(M, other.a, this.a)]; case 1: return [node3(M, other.a, list[0], this.a)]; case 2: @@ -102,11 +100,9 @@ One.prototype._nodes_with_list_and_one = function (M, list, other) { One.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node3(M, other.a, other.b, this.a)]; case 1: return [other.node(M), node2(M, list[0], this.a)]; case 2: @@ -127,11 +123,9 @@ One.prototype._nodes_with_list_and_two = function (M, list, other) { One.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node2(M, other.a, other.b), node2(M, other.c, this.a)]; case 1: return [other.node(M), node2(M, list[0], this.a)]; case 2: @@ -153,11 +147,9 @@ One.prototype._nodes_with_list_and_three = function (M, list, other) { One.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node3(M, other.a, other.b, other.c), node2(M, other.d, this.a)]; case 1: return [ node3(M, other.a, other.b, other.c), diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index e824d311..658a816f 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -87,11 +87,9 @@ Two.prototype._nodes_with_list = function (M, list, other) { Two.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node3(M, other.a, this.a, this.b)]; case 1: return [node2(M, other.a, list[0]), this.node(M)]; case 2: @@ -113,11 +111,9 @@ Two.prototype._nodes_with_list_and_one = function (M, list, other) { Two.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node2(M, other.a, other.b), node2(M, this.a, this.b)]; case 1: return [node3(M, other.a, other.b, list[0]), node2(M, this.a, this.b)]; case 2: @@ -139,11 +135,9 @@ Two.prototype._nodes_with_list_and_two = function (M, list, other) { Two.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node3(M, other.a, other.b, other.c), node2(M, this.a, this.b)]; case 1: return [ node3(M, other.a, other.b, other.c), @@ -172,14 +166,9 @@ Two.prototype._nodes_with_list_and_three = function (M, list, other) { Two.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [ - node3(M, other.a, other.b, other.c), - node3(M, other.d, this.a, this.b), - ]; case 1: return [ node2(M, other.a, other.b), diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index de129195..a54be384 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -91,11 +91,9 @@ Three.prototype._nodes_with_list = function (M, list, other) { Three.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); - assert(list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node2(M, other.a, this.a), node2(M, this.b, this.c)]; case 1: return [node2(M, other.a, list[0]), this.node(M)]; case 2: @@ -117,11 +115,9 @@ Three.prototype._nodes_with_list_and_one = function (M, list, other) { Three.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [other.node(M), this.node(M)]; case 1: return [node3(M, other.a, other.b, list[0]), this.node(M)]; case 2: @@ -139,11 +135,9 @@ Three.prototype._nodes_with_list_and_two = function (M, list, other) { Three.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [other.node(M), this.node(M)]; case 1: return [ node2(M, other.a, other.b), @@ -166,15 +160,9 @@ Three.prototype._nodes_with_list_and_three = function (M, list, other) { Three.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [ - node2(M, other.a, other.b), - node2(M, other.c, other.d), - this.node(M), - ]; case 1: return [ node2(M, other.a, other.b), diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 3e03cd7b..7b6f51f5 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -102,11 +102,9 @@ Four.prototype._nodes_with_list = function (M, list, other) { Four.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [node3(M, other.a, this.a, this.b), node2(M, this.c, this.d)]; case 1: return [ node3(M, other.a, list[0], this.a), @@ -135,14 +133,9 @@ Four.prototype._nodes_with_list_and_one = function (M, list, other) { Four.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [ - node3(M, other.a, other.b, this.a), - node3(M, this.b, this.c, this.d), - ]; case 1: return [ other.node(M), @@ -173,15 +166,9 @@ Four.prototype._nodes_with_list_and_two = function (M, list, other) { Four.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [ - other.node(M), - node2(M, this.a, this.b), - node2(M, this.c, this.d), - ]; case 1: return [ other.node(M), @@ -213,15 +200,9 @@ Four.prototype._nodes_with_list_and_three = function (M, list, other) { Four.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); - assert(Number.isInteger(list.length) && list.length >= 0 && list.length <= 4); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case switch (list.length) { - case 0: - return [ - node3(M, other.a, other.b, other.c), - node2(M, other.d, this.a), - node3(M, this.b, this.c, this.d), - ]; case 1: return [ node3(M, other.a, other.b, other.c), diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index d5d25165..ebec258c 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -4,6 +4,7 @@ import {_EMPTY} from '../../0-core/index.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; +import isSameMeasure from '../../_debug/isSameMeasure.js'; import {Single, Deep} from './index.js'; export function Empty(M) { @@ -50,6 +51,7 @@ Empty.prototype.append = function (iterable) { }; Empty.prototype.concat = function (other) { + assert(other instanceof Tree); return other; }; @@ -72,6 +74,7 @@ Empty.prototype.split = function (_p) { Empty.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return other; }; @@ -90,5 +93,6 @@ Empty.prototype._app3_with_single = function (list, value) { Empty.prototype._app3_with_deep = function (list, other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return _append_small_list(other, list); }; diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 837c15d4..74f213f1 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -5,6 +5,7 @@ import {One} from '../../1-digit/index.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; +import isSameMeasure from '../../_debug/isSameMeasure.js'; import {Empty, Deep} from './index.js'; export function Single(M, value) { @@ -71,6 +72,7 @@ Single.prototype.append = function (iterable) { }; Single.prototype.concat = function (other) { + assert(other instanceof Tree); return other.cons(this.a); }; @@ -95,6 +97,7 @@ Single.prototype.split = function (p) { Single.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return other.push(this.a); }; @@ -113,5 +116,6 @@ Single.prototype._app3_with_single = function (list, value) { Single.prototype._app3_with_deep = function (list, other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return _append_small_list(other, list).push(this.a); }; diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 22fb2289..91d3aef7 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -12,6 +12,7 @@ import {One, Two, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; +import isSameMeasure from '../../_debug/isSameMeasure.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {Empty} from './index.js'; @@ -132,6 +133,7 @@ Deep.prototype.append = function (iterable) { }; Deep.prototype.concat = function (other) { + assert(other instanceof Tree); return other._concat_with_deep(this); }; @@ -202,6 +204,7 @@ Deep.prototype.split = function (p) { Deep.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return new Deep( this.M, other.left, @@ -225,6 +228,7 @@ Deep.prototype._app3_with_single = function (list, value) { Deep.prototype._app3_with_deep = function (list, other) { assert(other instanceof Deep); + assert(isSameMeasure(other.M, this.M)); return new Deep( this.M, other.left, diff --git a/src/_debug/isSameMeasure.js b/src/_debug/isSameMeasure.js new file mode 100644 index 00000000..f1a272ac --- /dev/null +++ b/src/_debug/isSameMeasure.js @@ -0,0 +1,6 @@ +import underlyingMeasure from './underlyingMeasure.js'; + +const isSameMeasure = (M1, M2) => + underlyingMeasure(M1) === underlyingMeasure(M2); + +export default isSameMeasure; diff --git a/src/_debug/underlyingMeasure.js b/src/_debug/underlyingMeasure.js new file mode 100644 index 00000000..09fb7b50 --- /dev/null +++ b/src/_debug/underlyingMeasure.js @@ -0,0 +1,5 @@ +import {CachedMeasure} from '../0-core/measure/CachedMeasure.js'; + +const underlyingMeasure = (M) => (M instanceof CachedMeasure ? M.M : M); + +export default underlyingMeasure; From 909d5fa7958c3b5e7e86cf12bc3a3d420e7548f1 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 23:52:40 +0200 Subject: [PATCH 29/50] :recycle: refactor(Deep): Check all arguments in constructor. --- src/3-tree/implementations/2-Deep.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 91d3aef7..6fbdbf23 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -8,15 +8,34 @@ import { CachedMeasure, Split, } from '../../0-core/index.js'; -import {One, Two, Four} from '../../1-digit/index.js'; +import {One, Two, Three, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; -import {Empty} from './index.js'; +import {Empty} from './0-Empty.js'; +import {Single} from './1-Single.js'; export function Deep(M, left, middle, right) { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert( + middle instanceof Empty || + middle instanceof Single || + middle instanceof Deep || + middle instanceof Lazy, + ); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); assert(middle instanceof Lazy || middle.M instanceof CachedMeasure); this.M = M; this.left = left; From b10d0bb713d2230b91c3ca106c70a7cc2a9bb900 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 12:44:30 +0200 Subject: [PATCH 30/50] :bicyclist: perf: Exploit property mangling to reduce bundle size. --- mangle.json | 20 ++++ src/0-core/_fast/_digit.js | 2 +- src/0-core/split/Split.js | 6 +- src/0-core/split/deepL.js | 2 +- src/0-core/split/deepR.js | 2 +- src/1-digit/1-One.js | 18 ++-- src/1-digit/2-Two.js | 14 +-- src/1-digit/3-Three.js | 56 ++++++----- src/1-digit/4-Four.js | 18 ++-- src/2-node/2-Node2.js | 2 +- src/2-node/3-Node3.js | 2 +- src/3-tree/base/Tree.js | 2 +- src/3-tree/implementations/2-Deep.js | 136 +++++++++++++-------------- src/4-lazy/0-Lazy.js | 52 +++++----- src/5-api.js | 14 +-- test/src/FingerTree.js | 20 ++-- 16 files changed, 199 insertions(+), 167 deletions(-) create mode 100644 mangle.json diff --git a/mangle.json b/mangle.json new file mode 100644 index 00000000..119bcf0a --- /dev/null +++ b/mangle.json @@ -0,0 +1,20 @@ +{ + "minify": { + "mangle": { + "properties": { + "regex": "^_[^_]" + } + } + }, + "props": { + "props": { + "$_left": "l", + "$_middle": "m", + "$_right": "r", + "$_tree": "t", + "$_thunk": "f", + "$_node": "n", + "$_digit": "d" + } + } +} \ No newline at end of file diff --git a/src/0-core/_fast/_digit.js b/src/0-core/_fast/_digit.js index 8c448a02..6690104c 100644 --- a/src/0-core/_fast/_digit.js +++ b/src/0-core/_fast/_digit.js @@ -5,7 +5,7 @@ import {One, Two, Three} from '../../1-digit/index.js'; * Creates a Digit from as small list. * * It should never be called on length 4 lists since it is only called - * on results of splitDigit which outputs lists of length at most 3. + * on results of _splitDigit which outputs lists of length at most 3. * * @param {Array} list A list of length 1, 2, or 3. * @return {Digit} A digit containing the elements of list in order. diff --git a/src/0-core/split/Split.js b/src/0-core/split/Split.js index 60998ceb..4f6b48e6 100644 --- a/src/0-core/split/Split.js +++ b/src/0-core/split/Split.js @@ -1,5 +1,5 @@ export function Split(left, middle, right) { - this.left = left; - this.middle = middle; - this.right = right; + this._left = left; + this._middle = middle; + this._right = right; } diff --git a/src/0-core/split/deepL.js b/src/0-core/split/deepL.js index 48e11630..9a599a1a 100644 --- a/src/0-core/split/deepL.js +++ b/src/0-core/split/deepL.js @@ -14,7 +14,7 @@ export function deepL(M, left, middle, right) { return new Deep( M, - middle.head().digit(), + middle.head()._digit(), delay(() => middle.tail()), right, ); diff --git a/src/0-core/split/deepR.js b/src/0-core/split/deepR.js index ce97edfa..97bffe74 100644 --- a/src/0-core/split/deepR.js +++ b/src/0-core/split/deepR.js @@ -16,7 +16,7 @@ export function deepR(M, left, middle, right) { M, left, delay(() => middle.init()), - middle.last().digit(), + middle.last()._digit(), ); } diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 6d714b4d..0af41512 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -39,14 +39,14 @@ One.prototype.cons = function (value) { return new Two(value, this.a); }; -One.prototype.node = function (_M) { +One.prototype._node = function (_M) { throw new Error('cannot convert One to node'); }; /** * It is assumed that p(i+|this|) is true. */ -One.prototype.splitDigit = function (p, i, M) { +One.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. return new Split([], this.a, []); }; @@ -104,9 +104,9 @@ One.prototype._nodes_with_list_and_two = function (M, list, other) { // eslint-disable-next-line default-case switch (list.length) { case 1: - return [other.node(M), node2(M, list[0], this.a)]; + return [other._node(M), node2(M, list[0], this.a)]; case 2: - return [other.node(M), node3(M, list[0], list[1], this.a)]; + return [other._node(M), node3(M, list[0], list[1], this.a)]; case 3: return [ node3(M, other.a, other.b, list[0]), @@ -114,7 +114,7 @@ One.prototype._nodes_with_list_and_two = function (M, list, other) { ]; case 4: return [ - other.node(M), + other._node(M), node3(M, list[0], list[1], list[2]), node2(M, list[3], this.a), ]; @@ -127,18 +127,18 @@ One.prototype._nodes_with_list_and_three = function (M, list, other) { // eslint-disable-next-line default-case switch (list.length) { case 1: - return [other.node(M), node2(M, list[0], this.a)]; + return [other._node(M), node2(M, list[0], this.a)]; case 2: - return [other.node(M), node3(M, list[0], list[1], this.a)]; + return [other._node(M), node3(M, list[0], list[1], this.a)]; case 3: return [ - other.node(M), + other._node(M), node2(M, list[0], list[1]), node2(M, list[2], this.a), ]; case 4: return [ - other.node(M), + other._node(M), node2(M, list[0], list[1]), node3(M, list[2], list[3], this.a), ]; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 658a816f..9c58a894 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -40,14 +40,14 @@ Two.prototype.cons = function (value) { return new Three(value, this.a, this.b); }; -Two.prototype.node = function (M) { +Two.prototype._node = function (M) { return new Node2(this.measure(M), this.a, this.b); }; /** * It is assumed that p(i+|this|) is true. */ -Two.prototype.splitDigit = function (p, i, M) { +Two.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); if (p(i)) return new Split([], this.a, [this.b]); @@ -91,20 +91,20 @@ Two.prototype._nodes_with_list_and_one = function (M, list, other) { // eslint-disable-next-line default-case switch (list.length) { case 1: - return [node2(M, other.a, list[0]), this.node(M)]; + return [node2(M, other.a, list[0]), this._node(M)]; case 2: - return [node3(M, other.a, list[0], list[1]), this.node(M)]; + return [node3(M, other.a, list[0], list[1]), this._node(M)]; case 3: return [ node2(M, other.a, list[0]), node2(M, list[1], list[2]), - this.node(M), + this._node(M), ]; case 4: return [ node2(M, other.a, list[0]), node3(M, list[1], list[2], list[3]), - this.node(M), + this._node(M), ]; } }; @@ -117,7 +117,7 @@ Two.prototype._nodes_with_list_and_two = function (M, list, other) { case 1: return [node3(M, other.a, other.b, list[0]), node2(M, this.a, this.b)]; case 2: - return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + return [other._node(M), node2(M, list[0], list[1]), this._node(M)]; case 3: return [ node2(M, other.a, other.b), diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index a54be384..c73bc788 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -45,14 +45,14 @@ Three.prototype.cons = function (value) { return new Four(value, this.a, this.b, this.c); }; -Three.prototype.node = function (M) { +Three.prototype._node = function (M) { return new Node3(this.measure(M), this.a, this.b, this.c); }; /** * It is assumed that p(i+|this|) is true. */ -Three.prototype.splitDigit = function (p, i, M) { +Three.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); if (p(i)) return new Split([], this.a, [this.b, this.c]); @@ -72,17 +72,21 @@ Three.prototype._nodes_with_one = function (M, other) { Three.prototype._nodes_with_two = function (M, other) { assert(other instanceof Two); - return [other.node(M), this.node(M)]; + return [other._node(M), this._node(M)]; }; Three.prototype._nodes_with_three = function (M, other) { assert(other instanceof Three); - return [other.node(M), this.node(M)]; + return [other._node(M), this._node(M)]; }; Three.prototype._nodes_with_four = function (M, other) { assert(other instanceof Four); - return [node2(M, other.a, other.b), node2(M, other.c, other.d), this.node(M)]; + return [ + node2(M, other.a, other.b), + node2(M, other.c, other.d), + this._node(M), + ]; }; Three.prototype._nodes_with_list = function (M, list, other) { @@ -95,20 +99,20 @@ Three.prototype._nodes_with_list_and_one = function (M, list, other) { // eslint-disable-next-line default-case switch (list.length) { case 1: - return [node2(M, other.a, list[0]), this.node(M)]; + return [node2(M, other.a, list[0]), this._node(M)]; case 2: - return [node3(M, other.a, list[0], list[1]), this.node(M)]; + return [node3(M, other.a, list[0], list[1]), this._node(M)]; case 3: return [ node2(M, other.a, list[0]), node2(M, list[1], list[2]), - this.node(M), + this._node(M), ]; case 4: return [ node3(M, other.a, list[0], list[1]), node2(M, list[2], list[3]), - this.node(M), + this._node(M), ]; } }; @@ -119,16 +123,20 @@ Three.prototype._nodes_with_list_and_two = function (M, list, other) { // eslint-disable-next-line default-case switch (list.length) { case 1: - return [node3(M, other.a, other.b, list[0]), this.node(M)]; + return [node3(M, other.a, other.b, list[0]), this._node(M)]; case 2: - return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + return [other._node(M), node2(M, list[0], list[1]), this._node(M)]; case 3: - return [other.node(M), node3(M, list[0], list[1], list[2]), this.node(M)]; + return [ + other._node(M), + node3(M, list[0], list[1], list[2]), + this._node(M), + ]; case 4: return [ node3(M, other.a, other.b, list[0]), node3(M, list[1], list[2], list[3]), - this.node(M), + this._node(M), ]; } }; @@ -142,18 +150,22 @@ Three.prototype._nodes_with_list_and_three = function (M, list, other) { return [ node2(M, other.a, other.b), node2(M, other.c, list[0]), - this.node(M), + this._node(M), ]; case 2: - return [other.node(M), node2(M, list[0], list[1]), this.node(M)]; + return [other._node(M), node2(M, list[0], list[1]), this._node(M)]; case 3: - return [other.node(M), node3(M, list[0], list[1], list[2]), this.node(M)]; + return [ + other._node(M), + node3(M, list[0], list[1], list[2]), + this._node(M), + ]; case 4: return [ - other.node(M), + other._node(M), node2(M, list[0], list[1]), node2(M, list[2], list[3]), - this.node(M), + this._node(M), ]; } }; @@ -167,27 +179,27 @@ Three.prototype._nodes_with_list_and_four = function (M, list, other) { return [ node2(M, other.a, other.b), node3(M, other.c, other.d, list[0]), - this.node(M), + this._node(M), ]; case 2: return [ node3(M, other.a, other.b, other.c), node3(M, other.d, list[0], list[1]), - this.node(M), + this._node(M), ]; case 3: return [ node2(M, other.a, other.b), node2(M, other.c, other.d), node3(M, list[0], list[1], list[2]), - this.node(M), + this._node(M), ]; case 4: return [ node3(M, other.a, other.b, other.c), node2(M, other.d, list[0]), node3(M, list[1], list[2], list[3]), - this.node(M), + this._node(M), ]; } }; diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 7b6f51f5..c26f1547 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -46,14 +46,14 @@ Four.prototype.cons = function (_value) { throw new Error('cannot cons digit Four'); }; -Four.prototype.node = function (_M) { +Four.prototype._node = function (_M) { throw new Error('cannot convert Four to node'); }; /** * It is assumed that p(i+|this|) is true. */ -Four.prototype.splitDigit = function (p, i, M) { +Four.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); if (p(i)) return new Split([], this.a, [this.b, this.c, this.d]); @@ -138,13 +138,13 @@ Four.prototype._nodes_with_list_and_two = function (M, list, other) { switch (list.length) { case 1: return [ - other.node(M), + other._node(M), node3(M, list[0], this.a, this.b), node2(M, this.c, this.d), ]; case 2: return [ - other.node(M), + other._node(M), node3(M, list[0], list[1], this.a), node3(M, this.b, this.c, this.d), ]; @@ -156,7 +156,7 @@ Four.prototype._nodes_with_list_and_two = function (M, list, other) { ]; case 4: return [ - other.node(M), + other._node(M), node3(M, list[0], list[1], list[2]), node3(M, list[3], this.a, this.b), node2(M, this.c, this.d), @@ -171,26 +171,26 @@ Four.prototype._nodes_with_list_and_three = function (M, list, other) { switch (list.length) { case 1: return [ - other.node(M), + other._node(M), node2(M, list[0], this.a), node3(M, this.b, this.c, this.d), ]; case 2: return [ - other.node(M), + other._node(M), node3(M, list[0], list[1], this.a), node3(M, this.b, this.c, this.d), ]; case 3: return [ - other.node(M), + other._node(M), node2(M, list[0], list[1]), node2(M, list[2], this.a), node3(M, this.b, this.c, this.d), ]; case 4: return [ - other.node(M), + other._node(M), node2(M, list[0], list[1]), node3(M, list[2], list[3], this.a), node3(M, this.b, this.c, this.d), diff --git a/src/2-node/2-Node2.js b/src/2-node/2-Node2.js index 03b40a7b..31af5a71 100644 --- a/src/2-node/2-Node2.js +++ b/src/2-node/2-Node2.js @@ -18,6 +18,6 @@ Node2.prototype.measure = function () { return this.v; }; -Node2.prototype.digit = function () { +Node2.prototype._digit = function () { return new Two(this.a, this.b); }; diff --git a/src/2-node/3-Node3.js b/src/2-node/3-Node3.js index 0139abe3..994b442a 100644 --- a/src/2-node/3-Node3.js +++ b/src/2-node/3-Node3.js @@ -19,6 +19,6 @@ Node3.prototype.measure = function () { return this.v; }; -Node3.prototype.digit = function () { +Node3.prototype._digit = function () { return new Three(this.a, this.b, this.c); }; diff --git a/src/3-tree/base/Tree.js b/src/3-tree/base/Tree.js index d4fe1fc1..ed10a271 100644 --- a/src/3-tree/base/Tree.js +++ b/src/3-tree/base/Tree.js @@ -12,7 +12,7 @@ export function Tree() {} * * @returns {Tree} The shallow evaluated tree. */ -Tree.prototype.force = function () { +Tree.prototype._force = function () { return this; }; diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 6fbdbf23..cf38a509 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -38,9 +38,9 @@ export function Deep(M, left, middle, right) { ); assert(middle instanceof Lazy || middle.M instanceof CachedMeasure); this.M = M; - this.left = left; - this.middle = middle; - this.right = right; + this._left = left; + this._middle = middle; + this._right = right; this.v = null; } @@ -51,8 +51,8 @@ Deep.prototype.measure = function () { const M = this.M; this.v = M.plus( - this.left.measure(M), - M.plus(this.middle.measure(), this.right.measure(M)), + this._left.measure(M), + M.plus(this._middle.measure(), this._right.measure(M)), ); } @@ -64,71 +64,71 @@ Deep.prototype.isEmpty = function () { }; Deep.prototype.head = function () { - return this.left.head(); + return this._left.head(); }; Deep.prototype.last = function () { - return this.right.last(); + return this._right.last(); }; Deep.prototype.tail = function () { - if (this.left instanceof One) { - if (this.middle.isEmpty()) { - return _from_digit(this.M, this.right); + if (this._left instanceof One) { + if (this._middle.isEmpty()) { + return _from_digit(this.M, this._right); } return new Deep( this.M, - this.middle.head().digit(), - delay(() => this.middle.tail()), - this.right, + this._middle.head()._digit(), + delay(() => this._middle.tail()), + this._right, ); } - return new Deep(this.M, this.left.tail(), this.middle, this.right); + return new Deep(this.M, this._left.tail(), this._middle, this._right); }; Deep.prototype.init = function () { - if (this.right instanceof One) { - if (this.middle.isEmpty()) { - return _from_digit(this.M, this.left); + if (this._right instanceof One) { + if (this._middle.isEmpty()) { + return _from_digit(this.M, this._left); } return new Deep( this.M, - this.left, - delay(() => this.middle.init()), - this.middle.last().digit(), + this._left, + delay(() => this._middle.init()), + this._middle.last()._digit(), ); } - return new Deep(this.M, this.left, this.middle, this.right.init()); + return new Deep(this.M, this._left, this._middle, this._right.init()); }; Deep.prototype.cons = function (value) { - if (this.left instanceof Four) { + if (this._left instanceof Four) { return new Deep( this.M, - new Two(value, this.left.head()), - this.middle.cons(this.left.tail().node(this.M)), - this.right, + new Two(value, this._left.head()), + this._middle.cons(this._left.tail()._node(this.M)), + this._right, ); } - return new Deep(this.M, this.left.cons(value), this.middle, this.right); + return new Deep(this.M, this._left.cons(value), this._middle, this._right); }; Deep.prototype.push = function (value) { - if (this.right instanceof Four) { + if (this._right instanceof Four) { return new Deep( this.M, - this.left, - this.middle.push(this.right.init().node(this.M)), - new Two(this.right.last(), value), + this._left, + this._middle.push(this._right.init()._node(this.M)), + new Two(this._right.last(), value), ); } - return new Deep(this.M, this.left, this.middle, this.right.push(value)); + return new Deep(this.M, this._left, this._middle, this._right.push(value)); }; Deep.prototype.append = function (iterable) { @@ -144,11 +144,11 @@ Deep.prototype.append = function (iterable) { // TODO simplify const middle = _append_small_list( - this.middle, - this.right._nodes(this.M, new One(a)), + this._middle, + this._right._nodes(this.M, new One(a)), ); - return _fill_right(this.M, this.left, middle, b, it); + return _fill_right(this.M, this._left, middle, b, it); }; Deep.prototype.concat = function (other) { @@ -157,15 +157,15 @@ Deep.prototype.concat = function (other) { }; Deep.prototype[Symbol.iterator] = function* () { - yield* this.left; - for (const node of this.middle) yield* node; - yield* this.right; + yield* this._left; + for (const node of this._middle) yield* node; + yield* this._right; }; Deep.prototype.reversed = function* () { - yield* this.right.reversed(); - for (const node of this.middle.reversed()) yield* node.reversed(); - yield* this.left.reversed(); + yield* this._right.reversed(); + for (const node of this._middle.reversed()) yield* node.reversed(); + yield* this._left.reversed(); }; /** @@ -174,48 +174,48 @@ Deep.prototype.reversed = function* () { Deep.prototype.splitTree = function (p, i) { assert(p(this.M.plus(i, this.measure()))); - const {left, middle, right, M} = this; + const {_left, _middle, _right, M} = this; // See if the split point is inside the left tree - const leftMeasure = M.plus(i, left.measure(M)); + const leftMeasure = M.plus(i, _left.measure(M)); if (p(leftMeasure)) { - const split = left.splitDigit(p, i, M); + const split = _left._splitDigit(p, i, M); return new Split( - _from_small_list(M, split.left), - split.middle, - _deepL(M, split.right, middle, right), + _from_small_list(M, split._left), + split._middle, + _deepL(M, split._right, _middle, _right), ); } // See if the split point is inside the middle tree - const midMeasure = M.plus(leftMeasure, middle.measure()); + const midMeasure = M.plus(leftMeasure, _middle.measure()); if (p(midMeasure)) { - const midSplit = middle.splitTree(p, leftMeasure); - // Midsplit.middle is a Node since middle is a Tree ( Node a ) - const split = midSplit.middle - .digit() - .splitDigit(p, M.plus(leftMeasure, midSplit.left.measure()), M); + const midSplit = _middle.splitTree(p, leftMeasure); + // Midsplit._middle is a Node since middle is a Tree ( Node a ) + const split = midSplit._middle + ._digit() + ._splitDigit(p, M.plus(leftMeasure, midSplit._left.measure()), M); return new Split( - _deepR(M, left, midSplit.left, split.left), - split.middle, - _deepL(M, split.right, midSplit.right, right), + _deepR(M, _left, midSplit._left, split._left), + split._middle, + _deepL(M, split._right, midSplit._right, _right), ); } // The split point is in the right tree - const split = right.splitDigit(p, midMeasure, M); + const split = _right._splitDigit(p, midMeasure, M); return new Split( - _deepR(M, left, middle, split.left), - split.middle, - _from_small_list(M, split.right), + _deepR(M, _left, _middle, split._left), + split._middle, + _from_small_list(M, split._right), ); }; Deep.prototype.split = function (p) { if (p(this.measure())) { const split = this.splitTree(p, this.M.zero()); - return [split.left, split.right.cons(split.middle)]; + return [split._left, split._right.cons(split._middle)]; } return [this, new Empty(this.M)]; @@ -226,9 +226,9 @@ Deep.prototype._concat_with_deep = function (other) { assert(isSameMeasure(other.M, this.M)); return new Deep( this.M, - other.left, - other.middle._app3(other.right._nodes(this.M, this.left), this.middle), - this.right, + other._left, + other._middle._app3(other._right._nodes(this.M, this._left), this._middle), + this._right, ); }; @@ -250,11 +250,11 @@ Deep.prototype._app3_with_deep = function (list, other) { assert(isSameMeasure(other.M, this.M)); return new Deep( this.M, - other.left, - other.middle._app3( - other.right._nodes_with_list(this.M, list, this.left), - this.middle, + other._left, + other._middle._app3( + other._right._nodes_with_list(this.M, list, this._left), + this._middle, ), - this.right, + this._right, ); }; diff --git a/src/4-lazy/0-Lazy.js b/src/4-lazy/0-Lazy.js index d7158b67..ad177b13 100644 --- a/src/4-lazy/0-Lazy.js +++ b/src/4-lazy/0-Lazy.js @@ -1,93 +1,93 @@ import {Tree} from '../3-tree/base/Tree.js'; export function Lazy(thunk) { - this.tree = null; - this.thunk = thunk; + this._tree = null; + this._thunk = thunk; } Lazy.prototype = new Tree(); -Lazy.prototype.force = function () { - if (this.tree === null) { - this.tree = this.thunk(); - this.thunk = null; +Lazy.prototype._force = function () { + if (this._tree === null) { + this._tree = this._thunk(); + this._thunk = null; } - return this.tree; + return this._tree; }; Lazy.prototype.isEmpty = function () { - return this.force().isEmpty(); + return this._force().isEmpty(); }; Lazy.prototype.measure = function () { - return this.force().measure(); + return this._force().measure(); }; Lazy.prototype.head = function () { - return this.force().head(); + return this._force().head(); }; Lazy.prototype.last = function () { - return this.force().last(); + return this._force().last(); }; Lazy.prototype.cons = function (value) { - return this.force().cons(value); + return this._force().cons(value); }; Lazy.prototype.push = function (value) { - return this.force().push(value); + return this._force().push(value); }; Lazy.prototype.tail = function () { - return this.force().tail(); + return this._force().tail(); }; Lazy.prototype.init = function () { - return this.force().init(); + return this._force().init(); }; Lazy.prototype.splitTree = function (p, i) { - return this.force().splitTree(p, i); + return this._force().splitTree(p, i); }; Lazy.prototype.split = function (p) { - return this.force().split(p); + return this._force().split(p); }; Lazy.prototype.append = function (iterable) { - return this.force().append(iterable); + return this._force().append(iterable); }; Lazy.prototype.concat = function (other) { - return this.force().concat(other); + return this._force().concat(other); }; Lazy.prototype[Symbol.iterator] = function () { - return this.force()[Symbol.iterator](); + return this._force()[Symbol.iterator](); }; Lazy.prototype.reversed = function () { - return this.force().reversed(); + return this._force().reversed(); }; Lazy.prototype._concat_with_deep = function (other) { - return this.force()._concat_with_deep(other); + return this._force()._concat_with_deep(other); }; Lazy.prototype._app3 = function (list, other) { - return this.force()._app3(list, other); + return this._force()._app3(list, other); }; Lazy.prototype._app3_with_empty = function (list) { - return this.force()._app3_with_empty(list); + return this._force()._app3_with_empty(list); }; Lazy.prototype._app3_with_single = function (list, value) { - return this.force()._app3_with_single(list, value); + return this._force()._app3_with_single(list, value); }; Lazy.prototype._app3_with_deep = function (list, other) { - return this.force()._app3_with_deep(list, other); + return this._force()._app3_with_deep(list, other); }; diff --git a/src/5-api.js b/src/5-api.js index 9dc995be..45b1a72f 100644 --- a/src/5-api.js +++ b/src/5-api.js @@ -13,37 +13,37 @@ export {from} from './0-core/index.js'; export const leftTree = (treeSplit) => { assert(treeSplit instanceof Split); - return treeSplit.left; + return treeSplit._left; }; export const rightTree = (treeSplit) => { assert(treeSplit instanceof Split); - return treeSplit.right; + return treeSplit._right; }; export const middleElement = (treeSplit) => { assert(treeSplit instanceof Split); - return treeSplit.middle; + return treeSplit._middle; }; export const leftDigit = (tree) => { assert(tree instanceof Deep); - return tree.left; + return tree._left; }; export const rightDigit = (tree) => { assert(tree instanceof Deep); - return tree.right; + return tree._right; }; export const middleTree = (tree) => { assert(tree instanceof Deep); - return tree.middle; + return tree._middle; }; export const embeddedMeasure = (tree) => { assert(tree instanceof Tree); - return tree.force().M; + return tree._force().M; }; export const nodes = (M, left, right) => { diff --git a/test/src/FingerTree.js b/test/src/FingerTree.js index c3651135..ad0c7e41 100644 --- a/test/src/FingerTree.js +++ b/test/src/FingerTree.js @@ -218,55 +218,55 @@ test('FingerTree', (t) => { t.deepEqual( list(map(list, from(COUNTER, 'a').append('bcde').split(gt(0)))), [list(''), list('abcde')], - 'One.splitDigit 0', + 'One._splitDigit 0', ); // Provoke split of digit Two t.deepEqual( list(map(list, from(COUNTER, 'b').append('cde').prepend('a').split(gt(0)))), [list(''), list('abcde')], - 'Two.splitDigit 0', + 'Two._splitDigit 0', ); t.deepEqual( list(map(list, from(COUNTER, 'b').append('cde').prepend('a').split(gt(1)))), [list('a'), list('bcde')], - 'Two.splitDigit 1', + 'Two._splitDigit 1', ); // Provoke split of digit Three t.deepEqual( list(map(list, from(COUNTER, 'c').append('de').prepend('ab').split(gt(0)))), [list(''), list('abcde')], - 'Three.splitDigit 0', + 'Three._splitDigit 0', ); t.deepEqual( list(map(list, from(COUNTER, 'c').append('de').prepend('ab').split(gt(1)))), [list('a'), list('bcde')], - 'Three.splitDigit 1', + 'Three._splitDigit 1', ); t.deepEqual( list(map(list, from(COUNTER, 'c').append('de').prepend('ab').split(gt(2)))), [list('ab'), list('cde')], - 'Three.splitDigit 2', + 'Three._splitDigit 2', ); // Provoke split of digit Four t.deepEqual( list(map(list, from(COUNTER, 'd').append('e').prepend('abc').split(gt(0)))), [list(''), list('abcde')], - 'Four.splitDigit 0', + 'Four._splitDigit 0', ); t.deepEqual( list(map(list, from(COUNTER, 'd').append('e').prepend('abc').split(gt(1)))), [list('a'), list('bcde')], - 'Four.splitDigit 1', + 'Four._splitDigit 1', ); t.deepEqual( list(map(list, from(COUNTER, 'd').append('e').prepend('abc').split(gt(2)))), [list('ab'), list('cde')], - 'Four.splitDigit 2', + 'Four._splitDigit 2', ); t.deepEqual( list(map(list, from(COUNTER, 'd').append('e').prepend('abc').split(gt(3)))), [list('abc'), list('de')], - 'Four.splitDigit 3', + 'Four._splitDigit 3', ); // Provoke head / last on digits From 0f9bd6d8eff2c88bb9afa2b0ac12f761765ef877 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 30 Sep 2021 12:08:26 +0200 Subject: [PATCH 31/50] :bicyclist: perf: Disable function inlining as it does not work very well. --- mangle.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mangle.json b/mangle.json index 119bcf0a..d5aca4d0 100644 --- a/mangle.json +++ b/mangle.json @@ -4,6 +4,10 @@ "properties": { "regex": "^_[^_]" } + }, + "compress": { + "inline": false, + "reduce_funcs": false } }, "props": { From b3b301ae6877f375cee9cc317fdd3c7df65d61f8 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:59:49 +0200 Subject: [PATCH 32/50] :bicyclist: perf(split): Avoid creating temporary arrays. We immediately instantiate a Digit or null. It's a win-win best deal ever: - If we need a Digit, it's there! - No need to branch on list.length! So we win even when we need a Tree. Also we use separate struct DigitSplit to store result of _splitDigit since member types are not the same as in a tree Split. Maybe should rename Split to TreeSplit later. --- src/0-core/_fast/_digit.js | 24 ------------------- src/0-core/_fast/_from_digit.js | 12 ---------- src/0-core/_fast/_from_small_list.js | 35 ---------------------------- src/0-core/_fast/index.js | 3 --- src/0-core/split/DigitSplit.js | 17 ++++++++++++++ src/0-core/split/Split.js | 12 ++++++++++ src/0-core/split/deepL.js | 22 ++++++++++------- src/0-core/split/deepR.js | 22 ++++++++++------- src/1-digit/1-One.js | 9 +++++-- src/1-digit/2-Two.js | 13 ++++++++--- src/1-digit/3-Three.js | 20 ++++++++++++---- src/1-digit/4-Four.js | 25 ++++++++++++++++---- src/3-tree/implementations/2-Deep.js | 17 ++++---------- 13 files changed, 115 insertions(+), 116 deletions(-) delete mode 100644 src/0-core/_fast/_digit.js delete mode 100644 src/0-core/_fast/_from_digit.js delete mode 100644 src/0-core/_fast/_from_small_list.js create mode 100644 src/0-core/split/DigitSplit.js diff --git a/src/0-core/_fast/_digit.js b/src/0-core/_fast/_digit.js deleted file mode 100644 index 6690104c..00000000 --- a/src/0-core/_fast/_digit.js +++ /dev/null @@ -1,24 +0,0 @@ -import assert from 'assert'; -import {One, Two, Three} from '../../1-digit/index.js'; - -/** - * Creates a Digit from as small list. - * - * It should never be called on length 4 lists since it is only called - * on results of _splitDigit which outputs lists of length at most 3. - * - * @param {Array} list A list of length 1, 2, or 3. - * @return {Digit} A digit containing the elements of list in order. - */ -export function _digit(list) { - assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 3); - // eslint-disable-next-line default-case - switch (list.length) { - case 1: - return new One(list[0]); - case 2: - return new Two(list[0], list[1]); - case 3: - return new Three(list[0], list[1], list[2]); - } -} diff --git a/src/0-core/_fast/_from_digit.js b/src/0-core/_fast/_from_digit.js deleted file mode 100644 index c135d1d8..00000000 --- a/src/0-core/_fast/_from_digit.js +++ /dev/null @@ -1,12 +0,0 @@ -import assert from 'assert'; -import {One, Two, Three, Four} from '../../1-digit/index.js'; -import {Empty, Single, Deep} from '../../3-tree/index.js'; -import {cache} from '../measure/index.js'; - -export function _from_digit(M, digit) { - if (digit instanceof One) return new Single(M, digit.a); - assert( - digit instanceof Two || digit instanceof Three || digit instanceof Four, - ); - return new Deep(M, digit.init(), new Empty(cache(M)), new One(digit.last())); -} diff --git a/src/0-core/_fast/_from_small_list.js b/src/0-core/_fast/_from_small_list.js deleted file mode 100644 index 4c813e15..00000000 --- a/src/0-core/_fast/_from_small_list.js +++ /dev/null @@ -1,35 +0,0 @@ -import assert from 'assert'; -import {Empty, Single, Deep} from '../../3-tree/index.js'; -import {One, Two} from '../../1-digit/index.js'; -import {cache} from '../measure/index.js'; - -export const THRESHOLD = 3; - -export function _from_small_list(M, list) { - assert( - Number.isInteger(list.length) && - list.length >= 0 && - list.length <= THRESHOLD, - ); - // eslint-disable-next-line default-case - switch (list.length) { - case 0: - return new Empty(M); - case 1: - return new Single(M, list[0]); - case 2: - return new Deep( - M, - new One(list[0]), - new Empty(cache(M)), - new One(list[1]), - ); - case 3: - return new Deep( - M, - new Two(list[0], list[1]), - new Empty(cache(M)), - new One(list[2]), - ); - } -} diff --git a/src/0-core/_fast/index.js b/src/0-core/_fast/index.js index 193f69c4..1b5de6d5 100644 --- a/src/0-core/_fast/index.js +++ b/src/0-core/_fast/index.js @@ -1,8 +1,5 @@ export * from './_append.js'; export * from './_deepL.js'; export * from './_deepR.js'; -export * from './_digit.js'; -export * from './_from_digit.js'; -export * from './_from_small_list.js'; export * from './_prepend.js'; export * from './fast-iterators/index.js'; diff --git a/src/0-core/split/DigitSplit.js b/src/0-core/split/DigitSplit.js new file mode 100644 index 00000000..11611352 --- /dev/null +++ b/src/0-core/split/DigitSplit.js @@ -0,0 +1,17 @@ +import assert from 'assert'; +import {Digit} from '../../1-digit/0-Digit.js'; + +/** + * DigitSplit. + * + * @param {Digit} left + * @param {any} middle + * @param {Digit} right + */ +export function DigitSplit(left, middle, right) { + assert(left === null || left instanceof Digit); + assert(right === null || right instanceof Digit); + this._left = left; + this._middle = middle; + this._right = right; +} diff --git a/src/0-core/split/Split.js b/src/0-core/split/Split.js index 4f6b48e6..98524848 100644 --- a/src/0-core/split/Split.js +++ b/src/0-core/split/Split.js @@ -1,4 +1,16 @@ +import assert from 'assert'; +import {Tree} from '../../3-tree/base/Tree.js'; + +/** + * Split. + * + * @param {Tree} left + * @param {any} middle + * @param {Tree} right + */ export function Split(left, middle, right) { + assert(left instanceof Tree); + assert(right instanceof Tree); this._left = left; this._middle = middle; this._right = right; diff --git a/src/0-core/split/deepL.js b/src/0-core/split/deepL.js index 9a599a1a..0439d82e 100644 --- a/src/0-core/split/deepL.js +++ b/src/0-core/split/deepL.js @@ -1,16 +1,22 @@ -import {Deep} from '../../3-tree/index.js'; +import assert from 'assert'; + +import {Digit} from '../../1-digit/0-Digit.js'; +import {Deep, Tree} from '../../3-tree/index.js'; import {delay} from '../../4-lazy/index.js'; -import {_from_digit, _digit} from '../_fast/index.js'; /** - * @param {Measure} M - * @param {Array} left - * @param {FingerTree} middle + * @param {any} M + * @param {Digit|null} left + * @param {Tree} middle * @param {Digit} right */ export function deepL(M, left, middle, right) { - if (left.length === 0) { - if (middle.isEmpty()) return _from_digit(M, right); + assert(left === null || left instanceof Digit); + assert(middle instanceof Tree); + assert(right instanceof Digit); + + if (left === null) { + if (middle.isEmpty()) return right._tree(M); return new Deep( M, @@ -20,5 +26,5 @@ export function deepL(M, left, middle, right) { ); } - return new Deep(M, _digit(left), middle, right); + return new Deep(M, left, middle, right); } diff --git a/src/0-core/split/deepR.js b/src/0-core/split/deepR.js index 97bffe74..12d39c74 100644 --- a/src/0-core/split/deepR.js +++ b/src/0-core/split/deepR.js @@ -1,16 +1,22 @@ -import {Deep} from '../../3-tree/index.js'; +import assert from 'assert'; + +import {Digit} from '../../1-digit/0-Digit.js'; +import {Deep, Tree} from '../../3-tree/index.js'; import {delay} from '../../4-lazy/index.js'; -import {_from_digit, _digit} from '../_fast/index.js'; /** - * @param {Measure} M + * @param {any} M * @param {Digit} left - * @param {FingerTree} middle - * @param {Array} right + * @param {Tree} middle + * @param {Digit|null} right */ export function deepR(M, left, middle, right) { - if (right.length === 0) { - if (middle.isEmpty()) return _from_digit(M, left); + assert(left instanceof Digit); + assert(middle instanceof Tree); + assert(right === null || right instanceof Digit); + + if (right === null) { + if (middle.isEmpty()) return left._tree(M); return new Deep( M, @@ -20,5 +26,5 @@ export function deepR(M, left, middle, right) { ); } - return new Deep(M, left, middle, _digit(right)); + return new Deep(M, left, middle, right); } diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 0af41512..7fea4528 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -1,6 +1,7 @@ import assert from 'assert'; import {node2, node3} from '../2-node/index.js'; -import {Split} from '../0-core/index.js'; +import {DigitSplit} from '../0-core/split/DigitSplit.js'; +import {Single} from '../3-tree/implementations/1-Single.js'; import {Digit, Two, Three, Four} from './index.js'; export function One(a) { @@ -43,12 +44,16 @@ One.prototype._node = function (_M) { throw new Error('cannot convert One to node'); }; +One.prototype._tree = function (M) { + return new Single(M, this.a); +}; + /** * It is assumed that p(i+|this|) is true. */ One.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. - return new Split([], this.a, []); + return new DigitSplit(null, this.a, null); }; One.prototype._nodes = function (M, other) { diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 9c58a894..fc86d57f 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -1,6 +1,9 @@ import assert from 'assert'; import {Node2, node2, node3} from '../2-node/index.js'; -import {Split} from '../0-core/index.js'; +import {DigitSplit} from '../0-core/split/DigitSplit.js'; +import {Empty} from '../3-tree/implementations/0-Empty.js'; +import {cache} from '../0-core/measure/cache.js'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Three, Four} from './index.js'; export function Two(a, b) { @@ -44,14 +47,18 @@ Two.prototype._node = function (M) { return new Node2(this.measure(M), this.a, this.b); }; +Two.prototype._tree = function (M) { + return new Deep(M, new One(this.a), new Empty(cache(M)), new One(this.b)); +}; + /** * It is assumed that p(i+|this|) is true. */ Two.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); - if (p(i)) return new Split([], this.a, [this.b]); - return new Split([this.a], this.b, []); + if (p(i)) return new DigitSplit(null, this.a, new One(this.b)); + return new DigitSplit(new One(this.a), this.b, null); }; Two.prototype._nodes = function (M, other) { diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index c73bc788..30c9be28 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -1,6 +1,9 @@ import assert from 'assert'; import {node2, Node3, node3} from '../2-node/index.js'; -import {Split} from '../0-core/index.js'; +import {DigitSplit} from '../0-core/split/DigitSplit.js'; +import {Empty} from '../3-tree/implementations/0-Empty.js'; +import {cache} from '../0-core/measure/cache.js'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Two, Four} from './index.js'; export function Three(a, b, c) { @@ -49,16 +52,25 @@ Three.prototype._node = function (M) { return new Node3(this.measure(M), this.a, this.b, this.c); }; +Three.prototype._tree = function (M) { + return new Deep( + M, + new Two(this.a, this.b), + new Empty(cache(M)), + new One(this.c), + ); +}; + /** * It is assumed that p(i+|this|) is true. */ Three.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); - if (p(i)) return new Split([], this.a, [this.b, this.c]); + if (p(i)) return new DigitSplit(null, this.a, new Two(this.b, this.c)); i = M.plus(i, M.measure(this.b)); - if (p(i)) return new Split([this.a], this.b, [this.c]); - return new Split([this.a, this.b], this.c, []); + if (p(i)) return new DigitSplit(new One(this.a), this.b, new One(this.c)); + return new DigitSplit(new Two(this.a, this.b), this.c, null); }; Three.prototype._nodes = function (M, other) { diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index c26f1547..f3e70a30 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -1,6 +1,9 @@ import assert from 'assert'; +import {cache} from '../0-core/measure/cache.js'; +import {DigitSplit} from '../0-core/split/DigitSplit.js'; import {node2, node3} from '../2-node/index.js'; -import {Split} from '../0-core/index.js'; +import {Empty} from '../3-tree/implementations/0-Empty.js'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Two, Three} from './index.js'; export function Four(a, b, c, d) { @@ -50,18 +53,30 @@ Four.prototype._node = function (_M) { throw new Error('cannot convert Four to node'); }; +Four.prototype._tree = function (M) { + return new Deep( + M, + new Two(this.a, this.b), + new Empty(cache(M)), + new Two(this.c, this.d), + ); +}; + /** * It is assumed that p(i+|this|) is true. */ Four.prototype._splitDigit = function (p, i, M) { assert(p(M.plus(i, this.measure(M)))); // /!\ Potential Heisenbug generator. i = M.plus(i, M.measure(this.a)); - if (p(i)) return new Split([], this.a, [this.b, this.c, this.d]); + if (p(i)) + return new DigitSplit(null, this.a, new Three(this.b, this.c, this.d)); i = M.plus(i, M.measure(this.b)); - if (p(i)) return new Split([this.a], this.b, [this.c, this.d]); + if (p(i)) + return new DigitSplit(new One(this.a), this.b, new Two(this.c, this.d)); i = M.plus(i, M.measure(this.c)); - if (p(i)) return new Split([this.a, this.b], this.c, [this.d]); - return new Split([this.a, this.b, this.c], this.d, []); + if (p(i)) + return new DigitSplit(new Two(this.a, this.b), this.c, new One(this.d)); + return new DigitSplit(new Three(this.a, this.b, this.c), this.d, null); }; Four.prototype._nodes = function (M, other) { diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index cf38a509..75df6051 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -1,13 +1,6 @@ import assert from 'assert'; import {Tree} from '../base/index.js'; -import { - _from_digit, - _from_small_list, - _deepL, - _deepR, - CachedMeasure, - Split, -} from '../../0-core/index.js'; +import {_deepL, _deepR, CachedMeasure, Split} from '../../0-core/index.js'; import {One, Two, Three, Four} from '../../1-digit/index.js'; import {delay, Lazy} from '../../4-lazy/index.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; @@ -74,7 +67,7 @@ Deep.prototype.last = function () { Deep.prototype.tail = function () { if (this._left instanceof One) { if (this._middle.isEmpty()) { - return _from_digit(this.M, this._right); + return this._right._tree(this.M); } return new Deep( @@ -91,7 +84,7 @@ Deep.prototype.tail = function () { Deep.prototype.init = function () { if (this._right instanceof One) { if (this._middle.isEmpty()) { - return _from_digit(this.M, this._left); + return this._left._tree(this.M); } return new Deep( @@ -181,7 +174,7 @@ Deep.prototype.splitTree = function (p, i) { if (p(leftMeasure)) { const split = _left._splitDigit(p, i, M); return new Split( - _from_small_list(M, split._left), + split._left === null ? new Empty(M) : split._left._tree(M), split._middle, _deepL(M, split._right, _middle, _right), ); @@ -208,7 +201,7 @@ Deep.prototype.splitTree = function (p, i) { return new Split( _deepR(M, _left, _middle, split._left), split._middle, - _from_small_list(M, split._right), + split._right === null ? new Empty(M) : split._right._tree(M), ); }; From e66c944991dedd8aeca75e95464c743529e6fe5b Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 30 Sep 2021 17:39:54 +0200 Subject: [PATCH 33/50] :bicyclist: perf(_fill_right): Simplify! 15% magic speed-up. --- src/0-core/_fast/_fill_right.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/0-core/_fast/_fill_right.js b/src/0-core/_fast/_fill_right.js index bf28cbdc..c5888aba 100644 --- a/src/0-core/_fast/_fill_right.js +++ b/src/0-core/_fast/_fill_right.js @@ -36,9 +36,6 @@ export default function _fill_right(M, left, middle, x1, iterator) { let event; let x2; let x3; - let y1; - let y2; - let y3; for (;;) { event = iterator.next(); if (event.done) return new Deep(M, left, middle, new One(x1)); @@ -50,22 +47,7 @@ export default function _fill_right(M, left, middle, x1, iterator) { event = iterator.next(); if (event.done) return new Deep(M, left, middle, new Three(x1, x2, x3)); - y1 = event.value; - middle = middle.push(node3(M, x1, x2, x3)); - - event = iterator.next(); - if (event.done) return new Deep(M, left, middle, new One(y1)); - y2 = event.value; - - event = iterator.next(); - if (event.done) return new Deep(M, left, middle, new Two(y1, y2)); - y3 = event.value; - - event = iterator.next(); - if (event.done) return new Deep(M, left, middle, new Three(y1, y2, y3)); x1 = event.value; - - middle = middle.push(node3(M, y1, y2, y3)); } } From 2edbf7aa3099570f9cbe534dccdff8c358f50614 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 1 Oct 2021 11:51:01 +0200 Subject: [PATCH 34/50] :bicyclist: perf(append): Avoid recording intermediate states. This introduces more non-pure methods which can only be used with care. Currently these are prefixed with _UNSAFE_ but maybe _NON_PURE_ would be better? The dev and user experience would certainly be better if we exploited TypeScript types to ensure whatever is passed down to these methods is marked as mutable (including `this`) and whatever comes out of the API is immutable. We could also expose these non-pure methods for special usage but with extreme care. Maybe something like `tree.mutable()._NON_PURE_push(x).immutable();` or `tree.bulk((mutable) => mutable._NON_PURE_push(x));`. There are examples on how to handle this in `funkia/list` and `immutable.js`. Is the _NON_PURE_ prefix really necessary then? The two previous points would allow and exploit the definition of a `VolatileDeep` or `MutableDeep`, not sure on the name yet, whose right and/or left digit is mutable ("or" because we could also settle on `PushableDeep` and `ConsableDeep`). This would allow to replace digits with either specialized mutable digit objects OR with JavaScript Arrays depending on which solution is faster (member assignment + class method table or Array push + switch on Array length). --- src/0-core/_fast/_fill_right.js | 2 +- src/1-digit/1-One.js | 12 ++++++++++++ src/1-digit/2-Two.js | 11 +++++++++++ src/1-digit/3-Three.js | 14 ++++++++++++++ src/1-digit/4-Four.js | 17 +++++++++++++++++ src/3-tree/implementations/0-Empty.js | 12 +++++++++--- src/3-tree/implementations/1-Single.js | 22 ++++++++++++++-------- src/3-tree/implementations/2-Deep.js | 21 +++++++++++---------- src/4-lazy/0-Lazy.js | 4 ++++ 9 files changed, 93 insertions(+), 22 deletions(-) diff --git a/src/0-core/_fast/_fill_right.js b/src/0-core/_fast/_fill_right.js index c5888aba..5a636e4f 100644 --- a/src/0-core/_fast/_fill_right.js +++ b/src/0-core/_fast/_fill_right.js @@ -47,7 +47,7 @@ export default function _fill_right(M, left, middle, x1, iterator) { event = iterator.next(); if (event.done) return new Deep(M, left, middle, new Three(x1, x2, x3)); - middle = middle.push(node3(M, x1, x2, x3)); + middle = middle._UNSAFE_push(node3(M, x1, x2, x3)); x1 = event.value; } } diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 7fea4528..8e4ecebf 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -2,6 +2,7 @@ import assert from 'assert'; import {node2, node3} from '../2-node/index.js'; import {DigitSplit} from '../0-core/split/DigitSplit.js'; import {Single} from '../3-tree/implementations/1-Single.js'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, Two, Three, Four} from './index.js'; export function One(a) { @@ -184,3 +185,14 @@ One.prototype._nodes_with_list_and_four = function (M, list, other) { One.prototype._list = function () { return [this.a]; }; + +One.prototype._isolated_push = function (parent, value) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.push(value)); +}; + +One.prototype._UNSAFE_push = function (parent, value) { + assert(parent._right === this); + parent._right = this.push(value); + return parent; +}; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index fc86d57f..7e100aa7 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -207,3 +207,14 @@ Two.prototype._nodes_with_list_and_four = function (M, list, other) { Two.prototype._list = function () { return [this.a, this.b]; }; + +Two.prototype._isolated_push = function (parent, value) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.push(value)); +}; + +Two.prototype._UNSAFE_push = function (parent, value) { + assert(parent._right === this); + parent._right = this.push(value); + return parent; +}; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index 30c9be28..b1d547e8 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -219,3 +219,17 @@ Three.prototype._nodes_with_list_and_four = function (M, list, other) { Three.prototype._list = function () { return [this.a, this.b, this.c]; }; + +Three.prototype._isolated_push = function (parent, value) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.push(value)); +}; + +Three.prototype._UNSAFE_push = function (parent, value) { + assert(parent._right === this); + parent._middle = parent._middle._UNSAFE_push(this._node(parent.M)); + // NOTE the following is dangerous if alternating push and init + parent._right = new One(value); + // TODO maybe final output can be fixed + return parent; +}; diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index f3e70a30..31d763a0 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -251,3 +251,20 @@ Four.prototype._nodes_with_list_and_four = function (M, list, other) { Four.prototype._list = function () { return [this.a, this.b, this.c, this.d]; }; + +Four.prototype._isolated_push = function (parent, value) { + assert(parent._right === this); + return new Deep( + parent.M, + parent._left, + parent._middle.push(this.init()._node(parent.M)), + new Two(this.last(), value), + ); +}; + +Four.prototype._UNSAFE_push = function (parent, value) { + assert(parent._right === this); + parent._middle = parent._middle._UNSAFE_push(this.init()._node(parent.M)); + parent._right = new Two(this.last(), value); + return parent; +}; diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index ebec258c..9b7080a2 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -38,9 +38,11 @@ Empty.prototype.init = function () { return this; }; -Empty.prototype.push = function (value) { - return new Single(this.M, value); -}; +Empty.prototype._UNSAFE_push = + // eslint-disable-next-line no-multi-assign + Empty.prototype.push = function (value) { + return new Single(this.M, value); + }; Empty.prototype.cons = function (value) { return new Single(this.M, value); @@ -72,6 +74,10 @@ Empty.prototype.split = function (_p) { return [this, this]; }; +Empty.prototype._copy_spine = function () { + return this; +}; + Empty.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); assert(isSameMeasure(other.M, this.M)); diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 74f213f1..f36180bc 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -49,14 +49,16 @@ Single.prototype.cons = function (value) { ); }; -Single.prototype.push = function (value) { - return new Deep( - this.M, - new One(this.a), - new Empty(cache(this.M)), - new One(value), - ); -}; +Single.prototype._UNSAFE_push = + // eslint-disable-next-line no-multi-assign + Single.prototype.push = function (value) { + return new Deep( + this.M, + new One(this.a), + new Empty(cache(this.M)), + new One(value), + ); + }; Single.prototype.append = function (iterable) { const it = iterable[Symbol.iterator](); @@ -95,6 +97,10 @@ Single.prototype.split = function (p) { : [this, new Empty(this.M)]; }; +Single.prototype._copy_spine = function () { + return this; +}; + Single.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); assert(isSameMeasure(other.M, this.M)); diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 75df6051..7b146d1e 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -112,16 +112,11 @@ Deep.prototype.cons = function (value) { }; Deep.prototype.push = function (value) { - if (this._right instanceof Four) { - return new Deep( - this.M, - this._left, - this._middle.push(this._right.init()._node(this.M)), - new Two(this._right.last(), value), - ); - } + return this._right._isolated_push(this, value); +}; - return new Deep(this.M, this._left, this._middle, this._right.push(value)); +Deep.prototype._UNSAFE_push = function (value) { + return this._right._UNSAFE_push(this, value); }; Deep.prototype.append = function (iterable) { @@ -139,7 +134,9 @@ Deep.prototype.append = function (iterable) { const middle = _append_small_list( this._middle, this._right._nodes(this.M, new One(a)), - ); + )._copy_spine(); + // TODO _copy_spine should return a MutableDeep type on the spine + // TODO then _fill_right should only accept Empty, Single, or MutableDeep return _fill_right(this.M, this._left, middle, b, it); }; @@ -225,6 +222,10 @@ Deep.prototype._concat_with_deep = function (other) { ); }; +Deep.prototype._copy_spine = function () { + return new Deep(this.M, this._left, this._middle._copy_spine(), this._right); +}; + Deep.prototype._app3 = function (list, other) { assert(other instanceof Tree); return other._app3_with_deep(list, this); diff --git a/src/4-lazy/0-Lazy.js b/src/4-lazy/0-Lazy.js index ad177b13..8be248b7 100644 --- a/src/4-lazy/0-Lazy.js +++ b/src/4-lazy/0-Lazy.js @@ -40,6 +40,10 @@ Lazy.prototype.push = function (value) { return this._force().push(value); }; +Lazy.prototype._UNSAFE_push = function (value) { + return this._force()._UNSAFE_push(value); +}; + Lazy.prototype.tail = function () { return this._force().tail(); }; From 118fb83b60ad02728c873f29a6854f59a6c30c59 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:57:35 +0200 Subject: [PATCH 35/50] :bicyclist: perf(from): Use much more efficient construction by pushing. --- src/0-core/_fast/_from_iterable.js | 57 ---- src/0-core/_fast/_from_medium_list.js | 368 +------------------------- src/0-core/concatenate/from.js | 4 +- 3 files changed, 5 insertions(+), 424 deletions(-) delete mode 100644 src/0-core/_fast/_from_iterable.js diff --git a/src/0-core/_fast/_from_iterable.js b/src/0-core/_fast/_from_iterable.js deleted file mode 100644 index fd3a22fd..00000000 --- a/src/0-core/_fast/_from_iterable.js +++ /dev/null @@ -1,57 +0,0 @@ -// Import {Empty} from '../../3-tree/index.js'; - -import {Empty} from '../../3-tree/implementations/0-Empty.js'; -import { - THRESHOLD as MEDIUM_THRESHOLD, - _from_medium_list, - _from_largest_medium_list, -} from './_from_medium_list.js'; - -function increment(trees, tree) { - // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc - const n = trees.length | 0; - // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc - for (let i = 0; i !== n; i = (i + 1) | 0) { - if (trees[i] === null) { - trees[i] = tree; - return; - } - - tree = trees[i].concat(tree); - trees[i] = null; - } - - trees.push(tree); -} - -function sum(M, trees) { - let result = new Empty(M); - for (const tree of trees) { - if (tree !== null) { - result = tree.concat(result); - } - } - - return result; -} - -export function _from_iterable(M, iterable) { - // Return new Empty(M).append(iterable); - const it = iterable[Symbol.iterator](); - const trees = []; - for (;;) { - const list = []; - // eslint-disable-next-line no-bitwise,unicorn/prefer-math-trunc - for (let i = MEDIUM_THRESHOLD; i !== 0; i = (i - 1) | 0) { - const event = it.next(); - if (event.done) { - increment(trees, _from_medium_list(M, list)); - return sum(M, trees); - } - - list.push(event.value); - } - - increment(trees, _from_largest_medium_list(M, list)); - } -} diff --git a/src/0-core/_fast/_from_medium_list.js b/src/0-core/_fast/_from_medium_list.js index b1223c69..872fab12 100644 --- a/src/0-core/_fast/_from_medium_list.js +++ b/src/0-core/_fast/_from_medium_list.js @@ -1,305 +1,13 @@ import assert from 'assert'; import {Empty, Single, Deep} from '../../3-tree/index.js'; -import {Four, Three, Two, One} from '../../1-digit/index.js'; +import {Two, One} from '../../1-digit/index.js'; import {cache} from '../measure/index.js'; -import {node2, node3} from '../../2-node/index.js'; - -function _from_11(M, list) { - assert(list.length === 11); - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Single(cache(M), node3(M, list[4], list[5], list[6])), - new Four(list[7], list[8], list[9], list[10]), - ); -} - -function _from_12(M, list) { - assert(list.length === 12); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new One(node3(M, list[3], list[4], list[5])), - new Empty(cM), - new One(node3(M, list[6], list[7], list[8])), - ), - new Three(list[9], list[10], list[11]), - ); -} - -function _from_13(M, list) { - assert(list.length === 13); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new One(node3(M, list[3], list[4], list[5])), - new Empty(cM), - new One(node3(M, list[6], list[7], list[8])), - ), - new Four(list[9], list[10], list[11], list[12]), - ); -} - -function _from_14(M, list) { - assert(list.length === 14); - const cM = cache(M); - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Deep( - cM, - new One(node3(M, list[4], list[5], list[6])), - new Empty(cM), - new One(node3(M, list[7], list[8], list[9])), - ), - new Four(list[10], list[11], list[12], list[13]), - ); -} - -function _from_15(M, list) { - assert(list.length === 15); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two(node2(M, list[3], list[4]), node2(M, list[5], list[6])), - new Empty(cM), - new Two( - node2(M, list[7], list[8]), - node3(M, list[9], list[10], list[11]), - ), - ), - new Three(list[12], list[13], list[14]), - ); -} - -function _from_16(M, list) { - assert(list.length === 16); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two(node3(M, list[3], list[4], list[5]), node2(M, list[6], list[7])), - new Empty(cM), - new Two( - node2(M, list[8], list[9]), - node3(M, list[10], list[11], list[12]), - ), - ), - new Three(list[13], list[14], list[15]), - ); -} - -function _from_17(M, list) { - assert(list.length === 17); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ), - new Empty(cM), - new Two( - node2(M, list[9], list[10]), - node3(M, list[11], list[12], list[13]), - ), - ), - new Three(list[14], list[15], list[16]), - ); -} - -function _from_18(M, list) { - assert(list.length === 18); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ), - new Empty(cM), - new Two( - node3(M, list[9], list[10], list[11]), - node3(M, list[12], list[13], list[14]), - ), - ), - new Three(list[15], list[16], list[17]), - ); -} - -function _from_19(M, list) { - assert(list.length === 19); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ), - new Empty(cM), - new Two( - node3(M, list[9], list[10], list[11]), - node3(M, list[12], list[13], list[14]), - ), - ), - new Four(list[15], list[16], list[17], list[18]), - ); -} - -function _from_20(M, list) { - assert(list.length === 20); - const cM = cache(M); - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Deep( - cM, - new Two( - node3(M, list[4], list[5], list[6]), - node3(M, list[7], list[8], list[9]), - ), - new Empty(cM), - new Two( - node3(M, list[10], list[11], list[12]), - node3(M, list[13], list[14], list[15]), - ), - ), - new Four(list[16], list[17], list[18], list[19]), - ); -} - -function _from_21(M, list) { - assert(list.length === 21); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ), - new Empty(cM), - new Three( - node3(M, list[9], list[10], list[11]), - node3(M, list[12], list[13], list[14]), - node3(M, list[15], list[16], list[17]), - ), - ), - new Three(list[18], list[19], list[20]), - ); -} - -function _from_22(M, list) { - assert(list.length === 22); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Two( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - ), - new Empty(cM), - new Three( - node3(M, list[9], list[10], list[11]), - node3(M, list[12], list[13], list[14]), - node3(M, list[15], list[16], list[17]), - ), - ), - new Four(list[18], list[19], list[20], list[21]), - ); -} - -function _from_23(M, list) { - assert(list.length === 23); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Three( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - node3(M, list[9], list[10], list[11]), - ), - new Empty(cM), - new Three( - node3(M, list[12], list[13], list[14]), - node2(M, list[15], list[16]), - node3(M, list[17], list[18], list[19]), - ), - ), - new Three(list[20], list[21], list[22]), - ); -} - -function _from_24(M, list) { - assert(list.length === 24); - const cM = cache(M); - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Deep( - cM, - new Three( - node3(M, list[3], list[4], list[5]), - node3(M, list[6], list[7], list[8]), - node3(M, list[9], list[10], list[11]), - ), - new Empty(cM), - new Three( - node3(M, list[12], list[13], list[14]), - node3(M, list[15], list[16], list[17]), - node3(M, list[18], list[19], list[20]), - ), - ), - new Three(list[21], list[22], list[23]), - ); -} - -export const THRESHOLD = 12; - -export function _from_largest_medium_list(M, list) { - assert(list.length === THRESHOLD); - return _from_12(M, list); -} export function _from_medium_list(M, list) { - assert( - Number.isInteger(list.length) && - list.length >= 0 && - list.length <= THRESHOLD, - ); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { - case 0: - return new Empty(M); + switch (list.length | 0) { case 1: return new Single(M, list[0]); case 2: @@ -323,75 +31,5 @@ export function _from_medium_list(M, list) { new Empty(cache(M)), new Two(list[2], list[3]), ); - case 5: - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Empty(cache(M)), - new Two(list[3], list[4]), - ); - case 6: - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Empty(cache(M)), - new Three(list[3], list[4], list[5]), - ); - case 7: - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Empty(cache(M)), - new Three(list[4], list[5], list[6]), - ); - case 8: - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Empty(cache(M)), - new Four(list[4], list[5], list[6], list[7]), - ); - case 9: - return new Deep( - M, - new Three(list[0], list[1], list[2]), - new Single(cache(M), node3(M, list[3], list[4], list[5])), - new Three(list[6], list[7], list[8]), - ); - case 10: - return new Deep( - M, - new Four(list[0], list[1], list[2], list[3]), - new Single(cache(M), node3(M, list[4], list[5], list[6])), - new Three(list[7], list[8], list[9]), - ); - case 11: - return _from_11(M, list); - case 12: - return _from_12(M, list); - case 13: - return _from_13(M, list); - case 14: - return _from_14(M, list); - case 15: - return _from_15(M, list); - case 16: - return _from_16(M, list); - case 17: - return _from_17(M, list); - case 18: - return _from_18(M, list); - case 19: - return _from_19(M, list); - case 20: - return _from_20(M, list); - case 21: - return _from_21(M, list); - case 22: - return _from_22(M, list); - case 23: - return _from_23(M, list); - case 24: - return _from_24(M, list); } } diff --git a/src/0-core/concatenate/from.js b/src/0-core/concatenate/from.js index 20aa8a53..3e401a23 100644 --- a/src/0-core/concatenate/from.js +++ b/src/0-core/concatenate/from.js @@ -1,5 +1,5 @@ -import {_from_iterable} from '../_fast/_from_iterable.js'; +import _from_by_filling from '../_fast/_from_by_filling.js'; export function from(M, iterable) { - return _from_iterable(M, iterable); + return _from_by_filling(M, iterable); } From 542f69dbaf1509fffec9d32afe5af74616a69192 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 19:28:27 +0200 Subject: [PATCH 36/50] :bicyclist: perf(prepend): Prepend by concatenation instead of consing. --- src/3-tree/base/Tree.js | 8 +++----- src/3-tree/implementations/0-Empty.js | 8 +++++--- src/3-tree/implementations/1-Single.js | 17 ++++++----------- src/3-tree/implementations/2-Deep.js | 5 +++++ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/3-tree/base/Tree.js b/src/3-tree/base/Tree.js index ed10a271..99f1ec92 100644 --- a/src/3-tree/base/Tree.js +++ b/src/3-tree/base/Tree.js @@ -1,5 +1,3 @@ -import {prepend} from '../../0-core/index.js'; - /** * Base class for all implementations. */ @@ -95,6 +93,6 @@ Tree.prototype.dropUntil = function (predicate) { * * @returns {Tree} The output tree. */ -Tree.prototype.prepend = function (iterable) { - return prepend(this, iterable); -}; +// Tree.prototype.prepend = function (iterable) { +// return prepend(this, iterable); +// }; diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index 9b7080a2..e7933e9a 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -48,9 +48,11 @@ Empty.prototype.cons = function (value) { return new Single(this.M, value); }; -Empty.prototype.append = function (iterable) { - return _from_by_filling(this.M, iterable); -}; +Empty.prototype.prepend = + // eslint-disable-next-line no-multi-assign + Empty.prototype.append = function (iterable) { + return _from_by_filling(this.M, iterable); + }; Empty.prototype.concat = function (other) { assert(other instanceof Tree); diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index f36180bc..43aa6465 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -4,8 +4,8 @@ import {cache, Split} from '../../0-core/index.js'; import {One} from '../../1-digit/index.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; -import _fill_right from '../../0-core/_fast/_fill_right.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; +import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import {Empty, Deep} from './index.js'; export function Single(M, value) { @@ -60,17 +60,12 @@ Single.prototype._UNSAFE_push = ); }; -Single.prototype.append = function (iterable) { - const it = iterable[Symbol.iterator](); - - const event = it.next(); - if (event.done) return this; - const x1 = event.value; - - const left = new One(this.a); - const middle = new Empty(cache(this.M)); +Single.prototype.prepend = function (iterable) { + return _from_by_filling(this.M, iterable).push(this.a); +}; - return _fill_right(this.M, left, middle, x1, it); +Single.prototype.append = function (iterable) { + return _from_by_filling(this.M, iterable).cons(this.a); }; Single.prototype.concat = function (other) { diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 7b146d1e..543e700e 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -7,6 +7,7 @@ import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; +import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import {Empty} from './0-Empty.js'; import {Single} from './1-Single.js'; @@ -119,6 +120,10 @@ Deep.prototype._UNSAFE_push = function (value) { return this._right._UNSAFE_push(this, value); }; +Deep.prototype.prepend = function (iterable) { + return _from_by_filling(this.M, iterable).concat(this); +}; + Deep.prototype.append = function (iterable) { const it = iterable[Symbol.iterator](); From 9033dfbc3109e908a7cb59adaaa003514e3a6e97 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 4 Oct 2021 19:32:24 +0200 Subject: [PATCH 37/50] :broom: cleaning(append/prepend): Remove unused code. --- src/0-core/_fast/_append.js | 7 ------- src/0-core/_fast/_prepend.js | 7 ------- src/0-core/_fast/index.js | 2 -- src/0-core/concatenate/append.js | 5 ----- src/0-core/concatenate/index.js | 2 -- src/0-core/concatenate/prepend.js | 5 ----- 6 files changed, 28 deletions(-) delete mode 100644 src/0-core/_fast/_append.js delete mode 100644 src/0-core/_fast/_prepend.js delete mode 100644 src/0-core/concatenate/append.js delete mode 100644 src/0-core/concatenate/prepend.js diff --git a/src/0-core/_fast/_append.js b/src/0-core/_fast/_append.js deleted file mode 100644 index 4f72078f..00000000 --- a/src/0-core/_fast/_append.js +++ /dev/null @@ -1,7 +0,0 @@ -export function _append(tree, list) { - const n = list.length; - - for (let i = 0; i < n; ++i) tree = tree.push(list[i]); - - return tree; -} diff --git a/src/0-core/_fast/_prepend.js b/src/0-core/_fast/_prepend.js deleted file mode 100644 index b4e14ebc..00000000 --- a/src/0-core/_fast/_prepend.js +++ /dev/null @@ -1,7 +0,0 @@ -export function _prepend(tree, list) { - let i = list.length; - - while (i--) tree = tree.cons(list[i]); - - return tree; -} diff --git a/src/0-core/_fast/index.js b/src/0-core/_fast/index.js index 1b5de6d5..1e6333a1 100644 --- a/src/0-core/_fast/index.js +++ b/src/0-core/_fast/index.js @@ -1,5 +1,3 @@ -export * from './_append.js'; export * from './_deepL.js'; export * from './_deepR.js'; -export * from './_prepend.js'; export * from './fast-iterators/index.js'; diff --git a/src/0-core/concatenate/append.js b/src/0-core/concatenate/append.js deleted file mode 100644 index cd07bf26..00000000 --- a/src/0-core/concatenate/append.js +++ /dev/null @@ -1,5 +0,0 @@ -export function append(tree, iterable) { - for (const value of iterable) tree = tree.push(value); - - return tree; -} diff --git a/src/0-core/concatenate/index.js b/src/0-core/concatenate/index.js index 33f50afe..d007425d 100644 --- a/src/0-core/concatenate/index.js +++ b/src/0-core/concatenate/index.js @@ -1,3 +1 @@ -export * from './append.js'; export * from './from.js'; -export * from './prepend.js'; diff --git a/src/0-core/concatenate/prepend.js b/src/0-core/concatenate/prepend.js deleted file mode 100644 index 4f8c77b0..00000000 --- a/src/0-core/concatenate/prepend.js +++ /dev/null @@ -1,5 +0,0 @@ -import {_prepend} from '../_fast/index.js'; - -export function prepend(tree, iterable) { - return _prepend(tree, Array.from(iterable)); -} From c19b59bbf1c88c17aed29799d626b1e9ba919631 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Tue, 5 Oct 2021 00:02:05 +0200 Subject: [PATCH 38/50] :bicyclist: perf(cache): Avoid trashing the GC in rare cases. --- src/0-core/measure/cache.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/0-core/measure/cache.js b/src/0-core/measure/cache.js index 8943cfc5..ef41177f 100644 --- a/src/0-core/measure/cache.js +++ b/src/0-core/measure/cache.js @@ -1,5 +1,12 @@ import {CachedMeasure} from './index.js'; +const CACHE = new WeakMap(); + export function cache(M) { - return M instanceof CachedMeasure ? M : new CachedMeasure(M); + if (CACHE.has(M)) return CACHE.get(M); + + const cM = new CachedMeasure(M); + CACHE.set(M, cM); + CACHE.set(cM, cM); + return cM; } From b4af917428fc0ff778ef32f75a5220b19ff9a39f Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:02:57 +0200 Subject: [PATCH 39/50] :bicyclist: perf: Better lazy eval, avoid trashing GC with empty trees. --- package.json | 2 + src/0-core/_fast/_deepL.js | 6 -- src/0-core/_fast/_deepR.js | 6 -- src/0-core/_fast/_fill_right.js | 2 +- src/0-core/_fast/_from_by_filling.js | 6 +- src/0-core/_fast/_from_medium_list.js | 14 ++-- src/0-core/_fast/index.js | 3 - src/0-core/index.js | 1 - src/0-core/split/deepL.js | 9 +-- src/0-core/split/deepR.js | 9 +-- src/1-digit/1-One.js | 35 ++++++++++ src/1-digit/2-Two.js | 19 +++++- src/1-digit/3-Three.js | 24 +++++-- src/1-digit/4-Four.js | 28 ++++++-- src/3-tree/implementations/0-Empty.js | 2 +- src/3-tree/implementations/1-Single.js | 17 +++-- src/3-tree/implementations/2-Deep.js | 88 ++++++++---------------- src/4-lazy/1-delay.js | 12 ---- src/4-lazy/{0-Lazy.js => Lazy.js} | 14 +--- src/4-lazy/LazyApp3RecurseStep.js | 28 ++++++++ src/4-lazy/LazyInit.js | 17 +++++ src/4-lazy/LazyTail.js | 17 +++++ src/4-lazy/delayApp3RecurseStep.js | 6 ++ src/4-lazy/delayInit.js | 5 ++ src/4-lazy/delayTail.js | 5 ++ src/4-lazy/index.js | 2 - src/5-api.js | 93 -------------------------- src/5-api/digitSize.js | 20 ++++++ src/5-api/embeddedMeasure.js | 9 +++ src/5-api/empty.js | 13 ++++ src/5-api/from.js | 1 + src/5-api/leftDigit.js | 9 +++ src/5-api/leftTree.js | 9 +++ src/5-api/middleElement.js | 9 +++ src/5-api/middleTree.js | 9 +++ src/5-api/nodes.js | 23 +++++++ src/5-api/nodesWithList.js | 24 +++++++ src/5-api/rightDigit.js | 9 +++ src/5-api/rightTree.js | 9 +++ src/index.js | 18 +++-- 40 files changed, 379 insertions(+), 253 deletions(-) delete mode 100644 src/0-core/_fast/_deepL.js delete mode 100644 src/0-core/_fast/_deepR.js delete mode 100644 src/0-core/_fast/index.js delete mode 100644 src/4-lazy/1-delay.js rename src/4-lazy/{0-Lazy.js => Lazy.js} (89%) create mode 100644 src/4-lazy/LazyApp3RecurseStep.js create mode 100644 src/4-lazy/LazyInit.js create mode 100644 src/4-lazy/LazyTail.js create mode 100644 src/4-lazy/delayApp3RecurseStep.js create mode 100644 src/4-lazy/delayInit.js create mode 100644 src/4-lazy/delayTail.js delete mode 100644 src/4-lazy/index.js delete mode 100644 src/5-api.js create mode 100644 src/5-api/digitSize.js create mode 100644 src/5-api/embeddedMeasure.js create mode 100644 src/5-api/empty.js create mode 100644 src/5-api/from.js create mode 100644 src/5-api/leftDigit.js create mode 100644 src/5-api/leftTree.js create mode 100644 src/5-api/middleElement.js create mode 100644 src/5-api/middleTree.js create mode 100644 src/5-api/nodes.js create mode 100644 src/5-api/nodesWithList.js create mode 100644 src/5-api/rightDigit.js create mode 100644 src/5-api/rightTree.js diff --git a/package.json b/package.json index 72b3d449..92e3ed12 100644 --- a/package.json +++ b/package.json @@ -220,9 +220,11 @@ ], "rules": { "camelcase": "off", + "no-bitwise": "off", "unicorn/filename-case": "off", "unicorn/explicit-length-check": "off", "unicorn/no-array-push-push": "off", + "unicorn/prefer-math-trunc": "off", "unicorn/prefer-node-protocol": "off", "unicorn/prefer-module": "off" }, diff --git a/src/0-core/_fast/_deepL.js b/src/0-core/_fast/_deepL.js deleted file mode 100644 index cf5e21ba..00000000 --- a/src/0-core/_fast/_deepL.js +++ /dev/null @@ -1,6 +0,0 @@ -import {delay} from '../../4-lazy/index.js'; -import {deepL} from '../split/index.js'; - -export function _deepL(M, left, middle, right) { - return delay(() => deepL(M, left, middle, right)); -} diff --git a/src/0-core/_fast/_deepR.js b/src/0-core/_fast/_deepR.js deleted file mode 100644 index 13f0210c..00000000 --- a/src/0-core/_fast/_deepR.js +++ /dev/null @@ -1,6 +0,0 @@ -import {delay} from '../../4-lazy/index.js'; -import {deepR} from '../split/index.js'; - -export function _deepR(M, left, middle, right) { - return delay(() => deepR(M, left, middle, right)); -} diff --git a/src/0-core/_fast/_fill_right.js b/src/0-core/_fast/_fill_right.js index 5a636e4f..9ac316f0 100644 --- a/src/0-core/_fast/_fill_right.js +++ b/src/0-core/_fast/_fill_right.js @@ -8,7 +8,7 @@ import {node3} from '../../2-node/node3.js'; import {Empty} from '../../3-tree/implementations/0-Empty.js'; import {Single} from '../../3-tree/implementations/1-Single.js'; import {Deep} from '../../3-tree/implementations/2-Deep.js'; -import {Lazy} from '../../4-lazy/0-Lazy.js'; +import Lazy from '../../4-lazy/Lazy.js'; /** * _fill_right. diff --git a/src/0-core/_fast/_from_by_filling.js b/src/0-core/_fast/_from_by_filling.js index 7daa57e1..be1e6f36 100644 --- a/src/0-core/_fast/_from_by_filling.js +++ b/src/0-core/_fast/_from_by_filling.js @@ -1,5 +1,5 @@ import {One} from '../../1-digit/1-One.js'; -import {Empty} from '../../3-tree/implementations/0-Empty.js'; +import empty from '../../5-api/empty.js'; import {Single} from '../../3-tree/implementations/1-Single.js'; import {cache} from '../measure/cache.js'; import _fill_right from './_fill_right.js'; @@ -8,7 +8,7 @@ export default function _form_by_filling(M, iterable) { const it = iterable[Symbol.iterator](); let event = it.next(); - if (event.done) return new Empty(M); + if (event.done) return empty(M); const a = event.value; event = it.next(); @@ -16,7 +16,7 @@ export default function _form_by_filling(M, iterable) { const b = event.value; const left = new One(a); - const middle = new Empty(cache(M)); + const middle = empty(cache(M)); return _fill_right(M, left, middle, b, it); } diff --git a/src/0-core/_fast/_from_medium_list.js b/src/0-core/_fast/_from_medium_list.js index 872fab12..933949be 100644 --- a/src/0-core/_fast/_from_medium_list.js +++ b/src/0-core/_fast/_from_medium_list.js @@ -1,5 +1,6 @@ import assert from 'assert'; -import {Empty, Single, Deep} from '../../3-tree/index.js'; +import {Single, Deep} from '../../3-tree/index.js'; +import empty from '../../5-api/empty.js'; import {Two, One} from '../../1-digit/index.js'; import {cache} from '../measure/index.js'; @@ -11,24 +12,19 @@ export function _from_medium_list(M, list) { case 1: return new Single(M, list[0]); case 2: - return new Deep( - M, - new One(list[0]), - new Empty(cache(M)), - new One(list[1]), - ); + return new Deep(M, new One(list[0]), empty(cache(M)), new One(list[1])); case 3: return new Deep( M, new Two(list[0], list[1]), - new Empty(cache(M)), + empty(cache(M)), new One(list[2]), ); case 4: return new Deep( M, new Two(list[0], list[1]), - new Empty(cache(M)), + empty(cache(M)), new Two(list[2], list[3]), ); } diff --git a/src/0-core/_fast/index.js b/src/0-core/_fast/index.js deleted file mode 100644 index 1e6333a1..00000000 --- a/src/0-core/_fast/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './_deepL.js'; -export * from './_deepR.js'; -export * from './fast-iterators/index.js'; diff --git a/src/0-core/index.js b/src/0-core/index.js index 9581c5a0..b342d5e5 100644 --- a/src/0-core/index.js +++ b/src/0-core/index.js @@ -1,4 +1,3 @@ -export * from './_fast/index.js'; export * from './concatenate/index.js'; export * from './measure/index.js'; export * from './split/index.js'; diff --git a/src/0-core/split/deepL.js b/src/0-core/split/deepL.js index 0439d82e..3f7f3693 100644 --- a/src/0-core/split/deepL.js +++ b/src/0-core/split/deepL.js @@ -2,7 +2,7 @@ import assert from 'assert'; import {Digit} from '../../1-digit/0-Digit.js'; import {Deep, Tree} from '../../3-tree/index.js'; -import {delay} from '../../4-lazy/index.js'; +import delayTail from '../../4-lazy/delayTail.js'; /** * @param {any} M @@ -18,12 +18,7 @@ export function deepL(M, left, middle, right) { if (left === null) { if (middle.isEmpty()) return right._tree(M); - return new Deep( - M, - middle.head()._digit(), - delay(() => middle.tail()), - right, - ); + return new Deep(M, middle.head()._digit(), delayTail(middle), right); } return new Deep(M, left, middle, right); diff --git a/src/0-core/split/deepR.js b/src/0-core/split/deepR.js index 12d39c74..6c7c5005 100644 --- a/src/0-core/split/deepR.js +++ b/src/0-core/split/deepR.js @@ -2,7 +2,7 @@ import assert from 'assert'; import {Digit} from '../../1-digit/0-Digit.js'; import {Deep, Tree} from '../../3-tree/index.js'; -import {delay} from '../../4-lazy/index.js'; +import delayInit from '../../4-lazy/delayInit.js'; /** * @param {any} M @@ -18,12 +18,7 @@ export function deepR(M, left, middle, right) { if (right === null) { if (middle.isEmpty()) return left._tree(M); - return new Deep( - M, - left, - delay(() => middle.init()), - middle.last()._digit(), - ); + return new Deep(M, left, delayInit(middle), middle.last()._digit()); } return new Deep(M, left, middle, right); diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 8e4ecebf..6ed6d284 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -3,6 +3,8 @@ import {node2, node3} from '../2-node/index.js'; import {DigitSplit} from '../0-core/split/DigitSplit.js'; import {Single} from '../3-tree/implementations/1-Single.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; +import delayTail from '../4-lazy/delayTail.js'; +import delayInit from '../4-lazy/delayInit.js'; import {Digit, Two, Three, Four} from './index.js'; export function One(a) { @@ -186,6 +188,11 @@ One.prototype._list = function () { return [this.a]; }; +One.prototype._isolated_cons = function (parent, value) { + assert(parent._left === this); + return new Deep(parent.M, this.cons(value), parent._middle, parent._right); +}; + One.prototype._isolated_push = function (parent, value) { assert(parent._right === this); return new Deep(parent.M, parent._left, parent._middle, this.push(value)); @@ -196,3 +203,31 @@ One.prototype._UNSAFE_push = function (parent, value) { parent._right = this.push(value); return parent; }; + +One.prototype._isolated_init = function (parent) { + assert(parent._right === this); + if (parent._middle.isEmpty()) { + return parent._left._tree(parent.M); + } + + return new Deep( + parent.M, + parent._left, + delayInit(parent._middle), + parent._middle.last()._digit(), + ); +}; + +One.prototype._isolated_tail = function (parent) { + assert(parent._left === this); + if (parent._middle.isEmpty()) { + return parent._right._tree(parent.M); + } + + return new Deep( + parent.M, + parent._middle.head()._digit(), + delayTail(parent._middle), + parent._right, + ); +}; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 7e100aa7..f2c2bedf 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -1,7 +1,7 @@ import assert from 'assert'; import {Node2, node2, node3} from '../2-node/index.js'; import {DigitSplit} from '../0-core/split/DigitSplit.js'; -import {Empty} from '../3-tree/implementations/0-Empty.js'; +import empty from '../5-api/empty.js'; import {cache} from '../0-core/measure/cache.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Three, Four} from './index.js'; @@ -48,7 +48,7 @@ Two.prototype._node = function (M) { }; Two.prototype._tree = function (M) { - return new Deep(M, new One(this.a), new Empty(cache(M)), new One(this.b)); + return new Deep(M, new One(this.a), empty(cache(M)), new One(this.b)); }; /** @@ -208,6 +208,11 @@ Two.prototype._list = function () { return [this.a, this.b]; }; +Two.prototype._isolated_cons = function (parent, value) { + assert(parent._left === this); + return new Deep(parent.M, this.cons(value), parent._middle, parent._right); +}; + Two.prototype._isolated_push = function (parent, value) { assert(parent._right === this); return new Deep(parent.M, parent._left, parent._middle, this.push(value)); @@ -218,3 +223,13 @@ Two.prototype._UNSAFE_push = function (parent, value) { parent._right = this.push(value); return parent; }; + +Two.prototype._isolated_init = function (parent) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.init()); +}; + +Two.prototype._isolated_tail = function (parent) { + assert(parent._left === this); + return new Deep(parent.M, this.tail(), parent._middle, parent._right); +}; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index b1d547e8..a6b5942c 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -1,7 +1,7 @@ import assert from 'assert'; import {node2, Node3, node3} from '../2-node/index.js'; import {DigitSplit} from '../0-core/split/DigitSplit.js'; -import {Empty} from '../3-tree/implementations/0-Empty.js'; +import empty from '../5-api/empty.js'; import {cache} from '../0-core/measure/cache.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Two, Four} from './index.js'; @@ -53,12 +53,7 @@ Three.prototype._node = function (M) { }; Three.prototype._tree = function (M) { - return new Deep( - M, - new Two(this.a, this.b), - new Empty(cache(M)), - new One(this.c), - ); + return new Deep(M, new Two(this.a, this.b), empty(cache(M)), new One(this.c)); }; /** @@ -220,6 +215,11 @@ Three.prototype._list = function () { return [this.a, this.b, this.c]; }; +Three.prototype._isolated_cons = function (parent, value) { + assert(parent._left === this); + return new Deep(parent.M, this.cons(value), parent._middle, parent._right); +}; + Three.prototype._isolated_push = function (parent, value) { assert(parent._right === this); return new Deep(parent.M, parent._left, parent._middle, this.push(value)); @@ -233,3 +233,13 @@ Three.prototype._UNSAFE_push = function (parent, value) { // TODO maybe final output can be fixed return parent; }; + +Three.prototype._isolated_init = function (parent) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.init()); +}; + +Three.prototype._isolated_tail = function (parent) { + assert(parent._left === this); + return new Deep(parent.M, this.tail(), parent._middle, parent._right); +}; diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 31d763a0..d8a42b47 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -2,7 +2,7 @@ import assert from 'assert'; import {cache} from '../0-core/measure/cache.js'; import {DigitSplit} from '../0-core/split/DigitSplit.js'; import {node2, node3} from '../2-node/index.js'; -import {Empty} from '../3-tree/implementations/0-Empty.js'; +import empty from '../5-api/empty.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; import {Digit, One, Two, Three} from './index.js'; @@ -57,7 +57,7 @@ Four.prototype._tree = function (M) { return new Deep( M, new Two(this.a, this.b), - new Empty(cache(M)), + empty(cache(M)), new Two(this.c, this.d), ); }; @@ -252,13 +252,23 @@ Four.prototype._list = function () { return [this.a, this.b, this.c, this.d]; }; +Four.prototype._isolated_cons = function (parent, value) { + assert(parent._left === this); + return new Deep( + parent.M, + new Two(value, this.a), + parent._middle.cons(node3(parent.M, this.b, this.c, this.d)), + parent._right, + ); +}; + Four.prototype._isolated_push = function (parent, value) { assert(parent._right === this); return new Deep( parent.M, parent._left, - parent._middle.push(this.init()._node(parent.M)), - new Two(this.last(), value), + parent._middle.push(node3(parent.M, this.a, this.b, this.c)), + new Two(this.d, value), ); }; @@ -268,3 +278,13 @@ Four.prototype._UNSAFE_push = function (parent, value) { parent._right = new Two(this.last(), value); return parent; }; + +Four.prototype._isolated_init = function (parent) { + assert(parent._right === this); + return new Deep(parent.M, parent._left, parent._middle, this.init()); +}; + +Four.prototype._isolated_tail = function (parent) { + assert(parent._left === this); + return new Deep(parent.M, this.tail(), parent._middle, parent._right); +}; diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index e7933e9a..ed26ce77 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -1,10 +1,10 @@ import assert from 'assert'; import {Tree} from '../base/index.js'; -import {_EMPTY} from '../../0-core/index.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; +import {_EMPTY} from '../../0-core/_fast/fast-iterators/2-_EMPTY.js'; import {Single, Deep} from './index.js'; export function Empty(M) { diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 43aa6465..3996df85 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -6,7 +6,8 @@ import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import {_from_medium_list} from '../../0-core/_fast/_from_medium_list.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; -import {Empty, Deep} from './index.js'; +import empty from '../../5-api/empty.js'; +import {Deep} from './index.js'; export function Single(M, value) { this.M = M; @@ -33,18 +34,18 @@ Single.prototype.last = function () { }; Single.prototype.tail = function () { - return new Empty(this.M); + return empty(this.M); }; Single.prototype.init = function () { - return new Empty(this.M); + return empty(this.M); }; Single.prototype.cons = function (value) { return new Deep( this.M, new One(value), - new Empty(cache(this.M)), + empty(cache(this.M)), new One(this.a), ); }; @@ -55,7 +56,7 @@ Single.prototype._UNSAFE_push = return new Deep( this.M, new One(this.a), - new Empty(cache(this.M)), + empty(cache(this.M)), new One(value), ); }; @@ -83,13 +84,11 @@ Single.prototype[Symbol.iterator] = * It is assumed that p(i+|this|) is true. */ Single.prototype.splitTree = function (_p, _i) { - return new Split(new Empty(this.M), this.a, new Empty(this.M)); + return new Split(empty(this.M), this.a, empty(this.M)); }; Single.prototype.split = function (p) { - return p(this.measure()) - ? [new Empty(this.M), this] - : [this, new Empty(this.M)]; + return p(this.measure()) ? [empty(this.M), this] : [this, empty(this.M)]; }; Single.prototype._copy_spine = function () { diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 543e700e..c6f6fb1b 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -1,13 +1,15 @@ import assert from 'assert'; import {Tree} from '../base/index.js'; -import {_deepL, _deepR, CachedMeasure, Split} from '../../0-core/index.js'; +import {deepL, deepR, CachedMeasure, Split} from '../../0-core/index.js'; import {One, Two, Three, Four} from '../../1-digit/index.js'; -import {delay, Lazy} from '../../4-lazy/index.js'; +import Lazy from '../../4-lazy/Lazy.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; import _fill_right from '../../0-core/_fast/_fill_right.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; +import empty from '../../5-api/empty.js'; +import delayApp3RecurseStep from '../../4-lazy/delayApp3RecurseStep.js'; import {Empty} from './0-Empty.js'; import {Single} from './1-Single.js'; @@ -66,50 +68,15 @@ Deep.prototype.last = function () { }; Deep.prototype.tail = function () { - if (this._left instanceof One) { - if (this._middle.isEmpty()) { - return this._right._tree(this.M); - } - - return new Deep( - this.M, - this._middle.head()._digit(), - delay(() => this._middle.tail()), - this._right, - ); - } - - return new Deep(this.M, this._left.tail(), this._middle, this._right); + return this._left._isolated_tail(this); }; Deep.prototype.init = function () { - if (this._right instanceof One) { - if (this._middle.isEmpty()) { - return this._left._tree(this.M); - } - - return new Deep( - this.M, - this._left, - delay(() => this._middle.init()), - this._middle.last()._digit(), - ); - } - - return new Deep(this.M, this._left, this._middle, this._right.init()); + return this._right._isolated_init(this); }; Deep.prototype.cons = function (value) { - if (this._left instanceof Four) { - return new Deep( - this.M, - new Two(value, this._left.head()), - this._middle.cons(this._left.tail()._node(this.M)), - this._right, - ); - } - - return new Deep(this.M, this._left.cons(value), this._middle, this._right); + return this._left._isolated_cons(this, value); }; Deep.prototype.push = function (value) { @@ -169,41 +136,43 @@ Deep.prototype.reversed = function* () { Deep.prototype.splitTree = function (p, i) { assert(p(this.M.plus(i, this.measure()))); - const {_left, _middle, _right, M} = this; - - // See if the split point is inside the left tree - const leftMeasure = M.plus(i, _left.measure(M)); + // See if the split point is inside the left digit + const leftMeasure = this.M.plus(i, this._left.measure(this.M)); if (p(leftMeasure)) { - const split = _left._splitDigit(p, i, M); + const split = this._left._splitDigit(p, i, this.M); return new Split( - split._left === null ? new Empty(M) : split._left._tree(M), + split._left === null ? empty(this.M) : split._left._tree(this.M), split._middle, - _deepL(M, split._right, _middle, _right), + deepL(this.M, split._right, this._middle, this._right), ); } // See if the split point is inside the middle tree - const midMeasure = M.plus(leftMeasure, _middle.measure()); + const midMeasure = this.M.plus(leftMeasure, this._middle.measure()); if (p(midMeasure)) { - const midSplit = _middle.splitTree(p, leftMeasure); + const midSplit = this._middle.splitTree(p, leftMeasure); // Midsplit._middle is a Node since middle is a Tree ( Node a ) const split = midSplit._middle ._digit() - ._splitDigit(p, M.plus(leftMeasure, midSplit._left.measure()), M); + ._splitDigit( + p, + this.M.plus(leftMeasure, midSplit._left.measure()), + this.M, + ); return new Split( - _deepR(M, _left, midSplit._left, split._left), + deepR(this.M, this._left, midSplit._left, split._left), split._middle, - _deepL(M, split._right, midSplit._right, _right), + deepL(this.M, split._right, midSplit._right, this._right), ); } - // The split point is in the right tree - const split = _right._splitDigit(p, midMeasure, M); + // The split point is in the right digit + const split = this._right._splitDigit(p, midMeasure, this.M); return new Split( - _deepR(M, _left, _middle, split._left), + deepR(this.M, this._left, this._middle, split._left), split._middle, - split._right === null ? new Empty(M) : split._right._tree(M), + split._right === null ? empty(this.M) : split._right._tree(this.M), ); }; @@ -213,7 +182,7 @@ Deep.prototype.split = function (p) { return [split._left, split._right.cons(split._middle)]; } - return [this, new Empty(this.M)]; + return [this, empty(this.M)]; }; Deep.prototype._concat_with_deep = function (other) { @@ -250,10 +219,7 @@ Deep.prototype._app3_with_deep = function (list, other) { return new Deep( this.M, other._left, - other._middle._app3( - other._right._nodes_with_list(this.M, list, this._left), - this._middle, - ), + delayApp3RecurseStep(other, list, this), this._right, ); }; diff --git a/src/4-lazy/1-delay.js b/src/4-lazy/1-delay.js deleted file mode 100644 index 3771c51b..00000000 --- a/src/4-lazy/1-delay.js +++ /dev/null @@ -1,12 +0,0 @@ -import {Lazy} from './index.js'; - -/** - * Wraps a tree-returning function with a tree proxy that will shallow evaluate - * as soon as a method is called on it. - * - * @param {Function} thunk The function that evaluates to the underlying tree. - * @returns {Tree} The lazy tree. - */ -export function delay(thunk) { - return new Lazy(thunk); -} diff --git a/src/4-lazy/0-Lazy.js b/src/4-lazy/Lazy.js similarity index 89% rename from src/4-lazy/0-Lazy.js rename to src/4-lazy/Lazy.js index 8be248b7..3c2be82b 100644 --- a/src/4-lazy/0-Lazy.js +++ b/src/4-lazy/Lazy.js @@ -1,21 +1,9 @@ import {Tree} from '../3-tree/base/Tree.js'; -export function Lazy(thunk) { - this._tree = null; - this._thunk = thunk; -} +export default function Lazy() {} Lazy.prototype = new Tree(); -Lazy.prototype._force = function () { - if (this._tree === null) { - this._tree = this._thunk(); - this._thunk = null; - } - - return this._tree; -}; - Lazy.prototype.isEmpty = function () { return this._force().isEmpty(); }; diff --git a/src/4-lazy/LazyApp3RecurseStep.js b/src/4-lazy/LazyApp3RecurseStep.js new file mode 100644 index 00000000..738e334b --- /dev/null +++ b/src/4-lazy/LazyApp3RecurseStep.js @@ -0,0 +1,28 @@ +import Lazy from './Lazy.js'; + +export default function LazyApp3RecurseStep(left, middle, right) { + this._tree = null; + this._left = left; + this._middle = middle; + this._right = right; +} + +LazyApp3RecurseStep.prototype = new Lazy(); + +LazyApp3RecurseStep.prototype._force = function () { + if (this._tree === null) { + this._tree = this._left._middle._app3( + this._left._right._nodes_with_list( + this._left.M, + this._middle, + this._right._left, + ), + this._right._middle, + ); + this._left = null; + this._middle = null; + this._right = null; + } + + return this._tree; +}; diff --git a/src/4-lazy/LazyInit.js b/src/4-lazy/LazyInit.js new file mode 100644 index 00000000..a2089202 --- /dev/null +++ b/src/4-lazy/LazyInit.js @@ -0,0 +1,17 @@ +import Lazy from './Lazy.js'; + +export default function LazyInit(middle) { + this._tree = null; + this._middle = middle; +} + +LazyInit.prototype = new Lazy(); + +LazyInit.prototype._force = function () { + if (this._tree === null) { + this._tree = this._middle.init(); + this._middle = null; + } + + return this._tree; +}; diff --git a/src/4-lazy/LazyTail.js b/src/4-lazy/LazyTail.js new file mode 100644 index 00000000..37913f9f --- /dev/null +++ b/src/4-lazy/LazyTail.js @@ -0,0 +1,17 @@ +import Lazy from './Lazy.js'; + +export default function LazyTail(middle) { + this._tree = null; + this._middle = middle; +} + +LazyTail.prototype = new Lazy(); + +LazyTail.prototype._force = function () { + if (this._tree === null) { + this._tree = this._middle.tail(); + this._middle = null; + } + + return this._tree; +}; diff --git a/src/4-lazy/delayApp3RecurseStep.js b/src/4-lazy/delayApp3RecurseStep.js new file mode 100644 index 00000000..7c184cfa --- /dev/null +++ b/src/4-lazy/delayApp3RecurseStep.js @@ -0,0 +1,6 @@ +import LazyApp3RecurseStep from './LazyApp3RecurseStep.js'; + +const delayApp3RecurseStep = (left, middle, right) => + new LazyApp3RecurseStep(left, middle, right); + +export default delayApp3RecurseStep; diff --git a/src/4-lazy/delayInit.js b/src/4-lazy/delayInit.js new file mode 100644 index 00000000..3a7d29d2 --- /dev/null +++ b/src/4-lazy/delayInit.js @@ -0,0 +1,5 @@ +import LazyInit from './LazyInit.js'; + +const delayInit = (tree) => new LazyInit(tree); + +export default delayInit; diff --git a/src/4-lazy/delayTail.js b/src/4-lazy/delayTail.js new file mode 100644 index 00000000..9aab8c8b --- /dev/null +++ b/src/4-lazy/delayTail.js @@ -0,0 +1,5 @@ +import LazyTail from './LazyTail.js'; + +const delayTail = (tree) => new LazyTail(tree); + +export default delayTail; diff --git a/src/4-lazy/index.js b/src/4-lazy/index.js deleted file mode 100644 index 79faac42..00000000 --- a/src/4-lazy/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './0-Lazy.js'; -export * from './1-delay.js'; diff --git a/src/5-api.js b/src/5-api.js deleted file mode 100644 index 45b1a72f..00000000 --- a/src/5-api.js +++ /dev/null @@ -1,93 +0,0 @@ -import assert from 'assert'; -import {Split} from './0-core/split/Split.js'; -import {One} from './1-digit/1-One.js'; -import {Two} from './1-digit/2-Two.js'; -import {Three} from './1-digit/3-Three.js'; -import {Four} from './1-digit/4-Four.js'; -import {Tree} from './3-tree/base/Tree.js'; -import {Empty} from './3-tree/implementations/0-Empty.js'; -import {Deep} from './3-tree/implementations/2-Deep.js'; - -export const empty = (M) => new Empty(M); -export {from} from './0-core/index.js'; - -export const leftTree = (treeSplit) => { - assert(treeSplit instanceof Split); - return treeSplit._left; -}; - -export const rightTree = (treeSplit) => { - assert(treeSplit instanceof Split); - return treeSplit._right; -}; - -export const middleElement = (treeSplit) => { - assert(treeSplit instanceof Split); - return treeSplit._middle; -}; - -export const leftDigit = (tree) => { - assert(tree instanceof Deep); - return tree._left; -}; - -export const rightDigit = (tree) => { - assert(tree instanceof Deep); - return tree._right; -}; - -export const middleTree = (tree) => { - assert(tree instanceof Deep); - return tree._middle; -}; - -export const embeddedMeasure = (tree) => { - assert(tree instanceof Tree); - return tree._force().M; -}; - -export const nodes = (M, left, right) => { - assert( - left instanceof One || - left instanceof Two || - left instanceof Three || - left instanceof Four, - ); - assert( - right instanceof One || - right instanceof Two || - right instanceof Three || - right instanceof Four, - ); - return left._nodes(M, right); -}; - -export const nodesWithList = (M, left, list, right) => { - assert( - left instanceof One || - left instanceof Two || - left instanceof Three || - left instanceof Four, - ); - assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); - assert( - right instanceof One || - right instanceof Two || - right instanceof Three || - right instanceof Four, - ); - return left._nodes_with_list(M, list, right); -}; - -export const digitSize = (digit) => { - assert( - digit instanceof One || - digit instanceof Two || - digit instanceof Three || - digit instanceof Four, - ); - if (digit instanceof One) return 1; - if (digit instanceof Two) return 2; - if (digit instanceof Three) return 3; - return 4; -}; diff --git a/src/5-api/digitSize.js b/src/5-api/digitSize.js new file mode 100644 index 00000000..e612637f --- /dev/null +++ b/src/5-api/digitSize.js @@ -0,0 +1,20 @@ +import assert from 'assert'; +import {One} from '../1-digit/1-One.js'; +import {Two} from '../1-digit/2-Two.js'; +import {Three} from '../1-digit/3-Three.js'; +import {Four} from '../1-digit/4-Four.js'; + +const digitSize = (digit) => { + assert( + digit instanceof One || + digit instanceof Two || + digit instanceof Three || + digit instanceof Four, + ); + if (digit instanceof One) return 1; + if (digit instanceof Two) return 2; + if (digit instanceof Three) return 3; + return 4; +}; + +export default digitSize; diff --git a/src/5-api/embeddedMeasure.js b/src/5-api/embeddedMeasure.js new file mode 100644 index 00000000..056858d7 --- /dev/null +++ b/src/5-api/embeddedMeasure.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Tree} from '../3-tree/base/Tree.js'; + +const embeddedMeasure = (tree) => { + assert(tree instanceof Tree); + return tree._force().M; +}; + +export default embeddedMeasure; diff --git a/src/5-api/empty.js b/src/5-api/empty.js new file mode 100644 index 00000000..93087a52 --- /dev/null +++ b/src/5-api/empty.js @@ -0,0 +1,13 @@ +import {Empty} from '../3-tree/index.js'; + +const EMPTY = new WeakMap(); + +const empty = (M) => { + if (EMPTY.has(M)) return EMPTY.get(M); + + const tree = new Empty(M); + EMPTY.set(M, tree); + return tree; +}; + +export default empty; diff --git a/src/5-api/from.js b/src/5-api/from.js new file mode 100644 index 00000000..489a46a7 --- /dev/null +++ b/src/5-api/from.js @@ -0,0 +1 @@ +export {from as default} from '../0-core/index.js'; diff --git a/src/5-api/leftDigit.js b/src/5-api/leftDigit.js new file mode 100644 index 00000000..9c0827da --- /dev/null +++ b/src/5-api/leftDigit.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; + +const leftDigit = (tree) => { + assert(tree instanceof Deep); + return tree._left; +}; + +export default leftDigit; diff --git a/src/5-api/leftTree.js b/src/5-api/leftTree.js new file mode 100644 index 00000000..82850ca1 --- /dev/null +++ b/src/5-api/leftTree.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Split} from '../0-core/split/Split.js'; + +const leftTree = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit._left; +}; + +export default leftTree; diff --git a/src/5-api/middleElement.js b/src/5-api/middleElement.js new file mode 100644 index 00000000..0427dea8 --- /dev/null +++ b/src/5-api/middleElement.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Split} from '../0-core/split/Split.js'; + +const middleElement = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit._middle; +}; + +export default middleElement; diff --git a/src/5-api/middleTree.js b/src/5-api/middleTree.js new file mode 100644 index 00000000..7a5afb73 --- /dev/null +++ b/src/5-api/middleTree.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; + +const middleTree = (tree) => { + assert(tree instanceof Deep); + return tree._middle; +}; + +export default middleTree; diff --git a/src/5-api/nodes.js b/src/5-api/nodes.js new file mode 100644 index 00000000..cd2b119d --- /dev/null +++ b/src/5-api/nodes.js @@ -0,0 +1,23 @@ +import assert from 'assert'; +import {One} from '../1-digit/1-One.js'; +import {Two} from '../1-digit/2-Two.js'; +import {Three} from '../1-digit/3-Three.js'; +import {Four} from '../1-digit/4-Four.js'; + +const nodes = (M, left, right) => { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); + return left._nodes(M, right); +}; + +export default nodes; diff --git a/src/5-api/nodesWithList.js b/src/5-api/nodesWithList.js new file mode 100644 index 00000000..3624bcbe --- /dev/null +++ b/src/5-api/nodesWithList.js @@ -0,0 +1,24 @@ +import assert from 'assert'; +import {One} from '../1-digit/1-One.js'; +import {Two} from '../1-digit/2-Two.js'; +import {Three} from '../1-digit/3-Three.js'; +import {Four} from '../1-digit/4-Four.js'; + +const nodesWithList = (M, left, list, right) => { + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); + return left._nodes_with_list(M, list, right); +}; + +export default nodesWithList; diff --git a/src/5-api/rightDigit.js b/src/5-api/rightDigit.js new file mode 100644 index 00000000..c64ccb73 --- /dev/null +++ b/src/5-api/rightDigit.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Deep} from '../3-tree/implementations/2-Deep.js'; + +const rightDigit = (tree) => { + assert(tree instanceof Deep); + return tree._right; +}; + +export default rightDigit; diff --git a/src/5-api/rightTree.js b/src/5-api/rightTree.js new file mode 100644 index 00000000..c2e9eaca --- /dev/null +++ b/src/5-api/rightTree.js @@ -0,0 +1,9 @@ +import assert from 'assert'; +import {Split} from '../0-core/split/Split.js'; + +const rightTree = (treeSplit) => { + assert(treeSplit instanceof Split); + return treeSplit._right; +}; + +export default rightTree; diff --git a/src/index.js b/src/index.js index 6135f161..ea78900e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,12 @@ -// Export * from './0-core' ; -// export * from './1-digit' ; -// export * from './2-node' ; -// export * from './3-tree' ; -// export * from './4-lazy' ; -export * from './5-api.js'; +export {default as empty} from './5-api/empty.js'; +export {default as from} from './5-api/from.js'; +export {default as rightTree} from './5-api/rightTree.js'; +export {default as leftTree} from './5-api/leftTree.js'; +export {default as middleElement} from './5-api/middleElement.js'; +export {default as digitSize} from './5-api/digitSize.js'; +export {default as rightDigit} from './5-api/rightDigit.js'; +export {default as nodesWithList} from './5-api/nodesWithList.js'; +export {default as nodes} from './5-api/nodes.js'; +export {default as middleTree} from './5-api/middleTree.js'; +export {default as leftDigit} from './5-api/leftDigit.js'; +export {default as embeddedMeasure} from './5-api/embeddedMeasure.js'; From c6c53d777eb134e0c6e56ef6603e2e160fb26df3 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Tue, 5 Oct 2021 00:22:35 +0200 Subject: [PATCH 40/50] :recycle: refactor(Deep): Simplify #append. --- src/3-tree/implementations/2-Deep.js | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index c6f6fb1b..4b15b0c4 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -4,9 +4,7 @@ import {deepL, deepR, CachedMeasure, Split} from '../../0-core/index.js'; import {One, Two, Three, Four} from '../../1-digit/index.js'; import Lazy from '../../4-lazy/Lazy.js'; import _prepend_small_list from '../../0-core/_fast/_prepend_small_list.js'; -import _fill_right from '../../0-core/_fast/_fill_right.js'; import isSameMeasure from '../../_debug/isSameMeasure.js'; -import _append_small_list from '../../0-core/_fast/_append_small_list.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import empty from '../../5-api/empty.js'; import delayApp3RecurseStep from '../../4-lazy/delayApp3RecurseStep.js'; @@ -92,25 +90,7 @@ Deep.prototype.prepend = function (iterable) { }; Deep.prototype.append = function (iterable) { - const it = iterable[Symbol.iterator](); - - let event = it.next(); - if (event.done) return this; - const a = event.value; - - event = it.next(); - if (event.done) return this.push(a); - const b = event.value; - - // TODO simplify - const middle = _append_small_list( - this._middle, - this._right._nodes(this.M, new One(a)), - )._copy_spine(); - // TODO _copy_spine should return a MutableDeep type on the spine - // TODO then _fill_right should only accept Empty, Single, or MutableDeep - - return _fill_right(this.M, this._left, middle, b, it); + return this.concat(_from_by_filling(this.M, iterable)); }; Deep.prototype.concat = function (other) { From 86dd5e5320120d11bbc82d27d19ed273fedc3062 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:09:43 +0200 Subject: [PATCH 41/50] :bicyclist: perf(Four): Exploit other._node. --- src/1-digit/4-Four.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index d8a42b47..bf0fffa9 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -95,11 +95,7 @@ Four.prototype._nodes_with_two = function (M, other) { Four.prototype._nodes_with_three = function (M, other) { assert(other instanceof Three); - return [ - node3(M, other.a, other.b, other.c), - node2(M, this.a, this.b), - node2(M, this.c, this.d), - ]; + return [other._node(M), node2(M, this.a, this.b), node2(M, this.c, this.d)]; }; Four.prototype._nodes_with_four = function (M, other) { From 239ad1189c057b41a877e9e518df651b11e3e093 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:10:32 +0200 Subject: [PATCH 42/50] :broom: cleaning: Remove Tree#_copy_spine. --- src/3-tree/implementations/0-Empty.js | 4 ---- src/3-tree/implementations/1-Single.js | 4 ---- src/3-tree/implementations/2-Deep.js | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index ed26ce77..223d85ff 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -76,10 +76,6 @@ Empty.prototype.split = function (_p) { return [this, this]; }; -Empty.prototype._copy_spine = function () { - return this; -}; - Empty.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); assert(isSameMeasure(other.M, this.M)); diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index 3996df85..be43c16c 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -91,10 +91,6 @@ Single.prototype.split = function (p) { return p(this.measure()) ? [empty(this.M), this] : [this, empty(this.M)]; }; -Single.prototype._copy_spine = function () { - return this; -}; - Single.prototype._concat_with_deep = function (other) { assert(other instanceof Deep); assert(isSameMeasure(other.M, this.M)); diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 4b15b0c4..2dd388bd 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -176,10 +176,6 @@ Deep.prototype._concat_with_deep = function (other) { ); }; -Deep.prototype._copy_spine = function () { - return new Deep(this.M, this._left, this._middle._copy_spine(), this._right); -}; - Deep.prototype._app3 = function (list, other) { assert(other instanceof Tree); return other._app3_with_deep(list, this); From 3dbdfb8ab315e2af895545cc0caa365a801dc945 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:10:58 +0200 Subject: [PATCH 43/50] :adhesive_bandage: fix(Lazy): Define Lazy#prepend. --- src/4-lazy/Lazy.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/4-lazy/Lazy.js b/src/4-lazy/Lazy.js index 3c2be82b..0a8dddfb 100644 --- a/src/4-lazy/Lazy.js +++ b/src/4-lazy/Lazy.js @@ -48,6 +48,10 @@ Lazy.prototype.split = function (p) { return this._force().split(p); }; +Lazy.prototype.prepend = function (iterable) { + return this._force().prepend(iterable); +}; + Lazy.prototype.append = function (iterable) { return this._force().append(iterable); }; From 076ee354386c866c9231151cd6bf5dbe6b6aaf18 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Fri, 15 Oct 2021 13:14:37 +0200 Subject: [PATCH 44/50] :bicyclist: perf(iterator/reversed): 5-6x faster iterators. This also has the benefit of reducing legacy bundle sizes. --- .../_fast/fast-iterators/1-_EmptyGenerator.js | 4 ++ .../_fast/fast-iterators/BackwardIterator.js | 43 ++++++++++++ .../_fast/fast-iterators/DeepIterator.js | 67 +++++++++++++++++++ .../_fast/fast-iterators/ForwardIterator.js | 43 ++++++++++++ src/1-digit/0-Digit.js | 8 --- src/2-node/2-Node2.js | 8 --- src/2-node/3-Node3.js | 8 --- src/3-tree/implementations/0-Empty.js | 10 +-- src/3-tree/implementations/1-Single.js | 4 +- src/3-tree/implementations/2-Deep.js | 14 ++-- 10 files changed, 170 insertions(+), 39 deletions(-) create mode 100644 src/0-core/_fast/fast-iterators/BackwardIterator.js create mode 100644 src/0-core/_fast/fast-iterators/DeepIterator.js create mode 100644 src/0-core/_fast/fast-iterators/ForwardIterator.js diff --git a/src/0-core/_fast/fast-iterators/1-_EmptyGenerator.js b/src/0-core/_fast/fast-iterators/1-_EmptyGenerator.js index 73e21091..791236a4 100644 --- a/src/0-core/_fast/fast-iterators/1-_EmptyGenerator.js +++ b/src/0-core/_fast/fast-iterators/1-_EmptyGenerator.js @@ -3,3 +3,7 @@ export function _EmptyGenerator() {} _EmptyGenerator.prototype.next = function () { return {done: true}; }; + +_EmptyGenerator.prototype[Symbol.iterator] = function () { + return this; +}; diff --git a/src/0-core/_fast/fast-iterators/BackwardIterator.js b/src/0-core/_fast/fast-iterators/BackwardIterator.js new file mode 100644 index 00000000..64df18f6 --- /dev/null +++ b/src/0-core/_fast/fast-iterators/BackwardIterator.js @@ -0,0 +1,43 @@ +import assert from 'assert'; +import {Node2} from '../../../2-node/2-Node2.js'; +import {Node3} from '../../../2-node/3-Node3.js'; +import {Deep} from '../../../3-tree/implementations/2-Deep.js'; +import DeepIterator, {DOWNWARD} from './DeepIterator.js'; + +/** + * BackwardIterator. + * + * @param {Deep} tree + */ +export default function BackwardIterator(tree) { + assert(tree instanceof Deep); + this._stack = tree._right._list(); + this._level = this._stack.map(() => 0); + this._tree = tree; + this._direction = DOWNWARD; + this._currentLevel = 0; + this._treeStack = []; +} + +BackwardIterator.prototype = new DeepIterator(); + +BackwardIterator.prototype._downwardStep = function () { + this._stack = this._tree._right._list(); +}; + +BackwardIterator.prototype._upwardStep = function () { + this._stack = this._tree._left._list(); +}; + +BackwardIterator.prototype._traverse = function (level, x) { + if (x instanceof Node3) { + this._level.push(level, level); + this._stack.push(x.a, x.b); + return x.c; + } + + assert(x instanceof Node2); + this._level.push(level); + this._stack.push(x.a); + return x.b; +}; diff --git a/src/0-core/_fast/fast-iterators/DeepIterator.js b/src/0-core/_fast/fast-iterators/DeepIterator.js new file mode 100644 index 00000000..eb10fb0d --- /dev/null +++ b/src/0-core/_fast/fast-iterators/DeepIterator.js @@ -0,0 +1,67 @@ +import assert from 'assert'; +import {Empty} from '../../../3-tree/implementations/0-Empty.js'; +import {Single} from '../../../3-tree/implementations/1-Single.js'; +import {Deep} from '../../../3-tree/implementations/2-Deep.js'; + +export const DOWNWARD = 0; +export const UPWARD = 1; + +export default function DeepIterator() {} + +DeepIterator.prototype._pop = function () { + assert(this._stack.length >= 1); + assert(this._stack.length === this._level.length); + let x = this._stack.pop(); + let level = this._level.pop(); + + for (;;) { + assert(this._stack.length === this._level.length); + assert(Number.isInteger(level) && level >= 0); + if (level === 0) return {done: false, value: x}; + + x = this._traverse(--level, x); + } +}; + +DeepIterator.prototype.next = function () { + if (this._stack.length === 0) { + /* eslint-disable no-fallthrough */ + // eslint-disable-next-line default-case + switch (this._direction) { + case DOWNWARD: + this._tree._middle = this._tree._middle._force(); + if (this._tree._middle instanceof Deep) { + this._treeStack.push(this._tree); + this._tree = this._tree._middle; + this._downwardStep(); + ++this._currentLevel; + this._level = this._stack.map(() => this._currentLevel); + break; + } else { + this._direction = UPWARD; + if (this._tree._middle instanceof Single) { + this._stack = [this._tree._middle.a]; + this._level = [this._currentLevel + 1]; + break; + } + + assert(this._tree._middle instanceof Empty); + } + + case UPWARD: + if (this._currentLevel === -1) return {done: true}; + assert(this._tree instanceof Deep); + this._upwardStep(); + this._level = this._stack.map(() => this._currentLevel); + + this._tree = --this._currentLevel === -1 ? null : this._treeStack.pop(); + } + /* eslint-enable no-fallthrough */ + } + + return this._pop(); +}; + +DeepIterator.prototype[Symbol.iterator] = function () { + return this; +}; diff --git a/src/0-core/_fast/fast-iterators/ForwardIterator.js b/src/0-core/_fast/fast-iterators/ForwardIterator.js new file mode 100644 index 00000000..287a9686 --- /dev/null +++ b/src/0-core/_fast/fast-iterators/ForwardIterator.js @@ -0,0 +1,43 @@ +import assert from 'assert'; +import {Node2} from '../../../2-node/2-Node2.js'; +import {Node3} from '../../../2-node/3-Node3.js'; +import {Deep} from '../../../3-tree/implementations/2-Deep.js'; +import DeepIterator, {DOWNWARD} from './DeepIterator.js'; + +/** + * ForwardIterator. + * + * @param {Deep} tree + */ +export default function ForwardIterator(tree) { + assert(tree instanceof Deep); + this._stack = tree._left._list().reverse(); + this._level = this._stack.map(() => 0); + this._tree = tree; + this._direction = DOWNWARD; + this._currentLevel = 0; + this._treeStack = []; +} + +ForwardIterator.prototype = new DeepIterator(); + +ForwardIterator.prototype._downwardStep = function () { + this._stack = this._tree._left._list().reverse(); +}; + +ForwardIterator.prototype._upwardStep = function () { + this._stack = this._tree._right._list().reverse(); +}; + +ForwardIterator.prototype._traverse = function (level, x) { + if (x instanceof Node3) { + this._level.push(level, level); + this._stack.push(x.c, x.b); + return x.a; + } + + assert(x instanceof Node2); + this._level.push(level); + this._stack.push(x.b); + return x.a; +}; diff --git a/src/1-digit/0-Digit.js b/src/1-digit/0-Digit.js index 29d66754..3dc04c8b 100644 --- a/src/1-digit/0-Digit.js +++ b/src/1-digit/0-Digit.js @@ -1,9 +1 @@ export function Digit() {} - -Digit.prototype[Symbol.iterator] = function () { - return this._list()[Symbol.iterator](); -}; - -Digit.prototype.reversed = function () { - return this._list().reverse()[Symbol.iterator](); -}; diff --git a/src/2-node/2-Node2.js b/src/2-node/2-Node2.js index 31af5a71..e8dc7246 100644 --- a/src/2-node/2-Node2.js +++ b/src/2-node/2-Node2.js @@ -6,14 +6,6 @@ export function Node2(v, a, b) { this.b = b; } -Node2.prototype[Symbol.iterator] = function () { - return [this.a, this.b][Symbol.iterator](); -}; - -Node2.prototype.reversed = function () { - return [this.b, this.a][Symbol.iterator](); -}; - Node2.prototype.measure = function () { return this.v; }; diff --git a/src/2-node/3-Node3.js b/src/2-node/3-Node3.js index 994b442a..b93e80a3 100644 --- a/src/2-node/3-Node3.js +++ b/src/2-node/3-Node3.js @@ -7,14 +7,6 @@ export function Node3(v, a, b, c) { this.c = c; } -Node3.prototype[Symbol.iterator] = function () { - return [this.a, this.b, this.c][Symbol.iterator](); -}; - -Node3.prototype.reversed = function () { - return [this.c, this.b, this.a][Symbol.iterator](); -}; - Node3.prototype.measure = function () { return this.v; }; diff --git a/src/3-tree/implementations/0-Empty.js b/src/3-tree/implementations/0-Empty.js index 223d85ff..ac838723 100644 --- a/src/3-tree/implementations/0-Empty.js +++ b/src/3-tree/implementations/0-Empty.js @@ -59,11 +59,11 @@ Empty.prototype.concat = function (other) { return other; }; -Empty.prototype[Symbol.iterator] = function () { - return _EMPTY; -}; - -Empty.prototype.reversed = function* () {}; +Empty.prototype[Symbol.iterator] = + // eslint-disable-next-line no-multi-assign + Empty.prototype.reversed = function () { + return _EMPTY; + }; /** * It is assumed that p(i+|this|) is true. diff --git a/src/3-tree/implementations/1-Single.js b/src/3-tree/implementations/1-Single.js index be43c16c..8ca8142f 100644 --- a/src/3-tree/implementations/1-Single.js +++ b/src/3-tree/implementations/1-Single.js @@ -76,8 +76,8 @@ Single.prototype.concat = function (other) { Single.prototype[Symbol.iterator] = // eslint-disable-next-line no-multi-assign - Single.prototype.reversed = function* () { - yield this.a; + Single.prototype.reversed = function () { + return [this.a][Symbol.iterator](); }; /** diff --git a/src/3-tree/implementations/2-Deep.js b/src/3-tree/implementations/2-Deep.js index 2dd388bd..d98515dc 100644 --- a/src/3-tree/implementations/2-Deep.js +++ b/src/3-tree/implementations/2-Deep.js @@ -8,6 +8,8 @@ import isSameMeasure from '../../_debug/isSameMeasure.js'; import _from_by_filling from '../../0-core/_fast/_from_by_filling.js'; import empty from '../../5-api/empty.js'; import delayApp3RecurseStep from '../../4-lazy/delayApp3RecurseStep.js'; +import ForwardIterator from '../../0-core/_fast/fast-iterators/ForwardIterator.js'; +import BackwardIterator from '../../0-core/_fast/fast-iterators/BackwardIterator.js'; import {Empty} from './0-Empty.js'; import {Single} from './1-Single.js'; @@ -98,16 +100,12 @@ Deep.prototype.concat = function (other) { return other._concat_with_deep(this); }; -Deep.prototype[Symbol.iterator] = function* () { - yield* this._left; - for (const node of this._middle) yield* node; - yield* this._right; +Deep.prototype[Symbol.iterator] = function () { + return new ForwardIterator(this); }; -Deep.prototype.reversed = function* () { - yield* this._right.reversed(); - for (const node of this._middle.reversed()) yield* node.reversed(); - yield* this._left.reversed(); +Deep.prototype.reversed = function () { + return new BackwardIterator(this); }; /** From 19846b3cb66796107389c1b811adabc13cb99f74 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:12:44 +0200 Subject: [PATCH 45/50] :bicyclist: perf(DeepIterator): Avoid creating many temporary arrays. --- .../_fast/fast-iterators/BackwardIterator.js | 13 ++++----- .../_fast/fast-iterators/DeepIterator.js | 28 +++++++++---------- .../_fast/fast-iterators/ForwardIterator.js | 13 ++++----- src/1-digit/1-One.js | 9 ++++++ src/1-digit/2-Two.js | 14 ++++++++++ src/1-digit/3-Three.js | 22 +++++++++++++++ src/1-digit/4-Four.js | 24 ++++++++++++++++ 7 files changed, 94 insertions(+), 29 deletions(-) diff --git a/src/0-core/_fast/fast-iterators/BackwardIterator.js b/src/0-core/_fast/fast-iterators/BackwardIterator.js index 64df18f6..897bc922 100644 --- a/src/0-core/_fast/fast-iterators/BackwardIterator.js +++ b/src/0-core/_fast/fast-iterators/BackwardIterator.js @@ -11,22 +11,21 @@ import DeepIterator, {DOWNWARD} from './DeepIterator.js'; */ export default function BackwardIterator(tree) { assert(tree instanceof Deep); - this._stack = tree._right._list(); - this._level = this._stack.map(() => 0); - this._tree = tree; + this._stack = []; + this._level = []; this._direction = DOWNWARD; this._currentLevel = 0; - this._treeStack = []; + this._treeStack = [tree]; } BackwardIterator.prototype = new DeepIterator(); -BackwardIterator.prototype._downwardStep = function () { - this._stack = this._tree._right._list(); +BackwardIterator.prototype._downwardStep = function (tree) { + tree._right._backward(this); }; BackwardIterator.prototype._upwardStep = function () { - this._stack = this._tree._left._list(); + this._treeStack.pop()._left._backward(this); }; BackwardIterator.prototype._traverse = function (level, x) { diff --git a/src/0-core/_fast/fast-iterators/DeepIterator.js b/src/0-core/_fast/fast-iterators/DeepIterator.js index eb10fb0d..a2d66ca9 100644 --- a/src/0-core/_fast/fast-iterators/DeepIterator.js +++ b/src/0-core/_fast/fast-iterators/DeepIterator.js @@ -29,32 +29,30 @@ DeepIterator.prototype.next = function () { // eslint-disable-next-line default-case switch (this._direction) { case DOWNWARD: - this._tree._middle = this._tree._middle._force(); - if (this._tree._middle instanceof Deep) { - this._treeStack.push(this._tree); - this._tree = this._tree._middle; - this._downwardStep(); + // eslint-disable-next-line no-case-declarations + const tree = this._treeStack.pop()._force(); + if (tree instanceof Deep) { + this._downwardStep(tree); ++this._currentLevel; - this._level = this._stack.map(() => this._currentLevel); + this._treeStack.push(tree, tree._middle); break; } else { + assert(this._treeStack.length >= 1); this._direction = UPWARD; - if (this._tree._middle instanceof Single) { - this._stack = [this._tree._middle.a]; - this._level = [this._currentLevel + 1]; + if (tree instanceof Single) { + this._stack.push(tree.a); + this._level.push(this._currentLevel); break; } - assert(this._tree._middle instanceof Empty); + assert(tree instanceof Empty); } case UPWARD: - if (this._currentLevel === -1) return {done: true}; - assert(this._tree instanceof Deep); + if (this._currentLevel === 0) return {done: true}; + assert(this._treeStack[this._treeStack.length - 1] instanceof Deep); + --this._currentLevel; this._upwardStep(); - this._level = this._stack.map(() => this._currentLevel); - - this._tree = --this._currentLevel === -1 ? null : this._treeStack.pop(); } /* eslint-enable no-fallthrough */ } diff --git a/src/0-core/_fast/fast-iterators/ForwardIterator.js b/src/0-core/_fast/fast-iterators/ForwardIterator.js index 287a9686..d4fb36b7 100644 --- a/src/0-core/_fast/fast-iterators/ForwardIterator.js +++ b/src/0-core/_fast/fast-iterators/ForwardIterator.js @@ -11,22 +11,21 @@ import DeepIterator, {DOWNWARD} from './DeepIterator.js'; */ export default function ForwardIterator(tree) { assert(tree instanceof Deep); - this._stack = tree._left._list().reverse(); - this._level = this._stack.map(() => 0); - this._tree = tree; + this._stack = []; + this._level = []; this._direction = DOWNWARD; this._currentLevel = 0; - this._treeStack = []; + this._treeStack = [tree]; } ForwardIterator.prototype = new DeepIterator(); -ForwardIterator.prototype._downwardStep = function () { - this._stack = this._tree._left._list().reverse(); +ForwardIterator.prototype._downwardStep = function (tree) { + tree._left._forward(this); }; ForwardIterator.prototype._upwardStep = function () { - this._stack = this._tree._right._list().reverse(); + this._treeStack.pop()._right._forward(this); }; ForwardIterator.prototype._traverse = function (level, x) { diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index 6ed6d284..b2d3df98 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -231,3 +231,12 @@ One.prototype._isolated_tail = function (parent) { parent._right, ); }; + +One.prototype._backward = + // eslint-disable-next-line no-multi-assign + One.prototype._forward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.a); + iterator._level.push(iterator._currentLevel); + }; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index f2c2bedf..677914d5 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -233,3 +233,17 @@ Two.prototype._isolated_tail = function (parent) { assert(parent._left === this); return new Deep(parent.M, this.tail(), parent._middle, parent._right); }; + +Two.prototype._forward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.b, this.a); + iterator._level.push(iterator._currentLevel, iterator._currentLevel); +}; + +Two.prototype._backward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.a, this.b); + iterator._level.push(iterator._currentLevel, iterator._currentLevel); +}; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index a6b5942c..bf1c1889 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -243,3 +243,25 @@ Three.prototype._isolated_tail = function (parent) { assert(parent._left === this); return new Deep(parent.M, this.tail(), parent._middle, parent._right); }; + +Three.prototype._forward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.c, this.b, this.a); + iterator._level.push( + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + ); +}; + +Three.prototype._backward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.a, this.b, this.c); + iterator._level.push( + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + ); +}; diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index bf0fffa9..22f9a7fc 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -284,3 +284,27 @@ Four.prototype._isolated_tail = function (parent) { assert(parent._left === this); return new Deep(parent.M, this.tail(), parent._middle, parent._right); }; + +Four.prototype._forward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.d, this.c, this.b, this.a); + iterator._level.push( + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + ); +}; + +Four.prototype._backward = function (iterator) { + assert(iterator._stack.length === 0); + assert(iterator._level.length === 0); + iterator._stack.push(this.a, this.b, this.c, this.d); + iterator._level.push( + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + iterator._currentLevel, + ); +}; From 3a97164e16ea2b700c444d7c25adc67655e25c92 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:16:36 +0200 Subject: [PATCH 46/50] :bicyclist: perf(DeepIterator): Replace instanceof checks by proto. --- src/0-core/_fast/fast-iterators/BackwardIterator.js | 13 +++---------- src/0-core/_fast/fast-iterators/ForwardIterator.js | 13 +++---------- src/2-node/2-Node2.js | 12 ++++++++++++ src/2-node/3-Node3.js | 12 ++++++++++++ 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/0-core/_fast/fast-iterators/BackwardIterator.js b/src/0-core/_fast/fast-iterators/BackwardIterator.js index 897bc922..ab6b4a0c 100644 --- a/src/0-core/_fast/fast-iterators/BackwardIterator.js +++ b/src/0-core/_fast/fast-iterators/BackwardIterator.js @@ -29,14 +29,7 @@ BackwardIterator.prototype._upwardStep = function () { }; BackwardIterator.prototype._traverse = function (level, x) { - if (x instanceof Node3) { - this._level.push(level, level); - this._stack.push(x.a, x.b); - return x.c; - } - - assert(x instanceof Node2); - this._level.push(level); - this._stack.push(x.a); - return x.b; + assert(Number.isInteger(level) && level >= 0); + assert(x instanceof Node2 || x instanceof Node3); + return x._backward(level, this); }; diff --git a/src/0-core/_fast/fast-iterators/ForwardIterator.js b/src/0-core/_fast/fast-iterators/ForwardIterator.js index d4fb36b7..d3aaef98 100644 --- a/src/0-core/_fast/fast-iterators/ForwardIterator.js +++ b/src/0-core/_fast/fast-iterators/ForwardIterator.js @@ -29,14 +29,7 @@ ForwardIterator.prototype._upwardStep = function () { }; ForwardIterator.prototype._traverse = function (level, x) { - if (x instanceof Node3) { - this._level.push(level, level); - this._stack.push(x.c, x.b); - return x.a; - } - - assert(x instanceof Node2); - this._level.push(level); - this._stack.push(x.b); - return x.a; + assert(Number.isInteger(level) && level >= 0); + assert(x instanceof Node2 || x instanceof Node3); + return x._forward(level, this); }; diff --git a/src/2-node/2-Node2.js b/src/2-node/2-Node2.js index e8dc7246..d44229f3 100644 --- a/src/2-node/2-Node2.js +++ b/src/2-node/2-Node2.js @@ -13,3 +13,15 @@ Node2.prototype.measure = function () { Node2.prototype._digit = function () { return new Two(this.a, this.b); }; + +Node2.prototype._forward = function (level, iterator) { + iterator._level.push(level); + iterator._stack.push(this.b); + return this.a; +}; + +Node2.prototype._backward = function (level, iterator) { + iterator._level.push(level); + iterator._stack.push(this.a); + return this.b; +}; diff --git a/src/2-node/3-Node3.js b/src/2-node/3-Node3.js index b93e80a3..152eb29e 100644 --- a/src/2-node/3-Node3.js +++ b/src/2-node/3-Node3.js @@ -14,3 +14,15 @@ Node3.prototype.measure = function () { Node3.prototype._digit = function () { return new Three(this.a, this.b, this.c); }; + +Node3.prototype._forward = function (level, iterator) { + iterator._level.push(level, level); + iterator._stack.push(this.c, this.b); + return this.a; +}; + +Node3.prototype._backward = function (level, iterator) { + iterator._level.push(level, level); + iterator._stack.push(this.a, this.b); + return this.c; +}; From 4e24c9c3f1e383d512cee4a4bddb08361c06eabe Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:23:20 +0200 Subject: [PATCH 47/50] :bicyclist: perf: Switch on small list length's last two bits. --- src/0-core/_fast/_append_small_list.js | 6 +-- src/0-core/_fast/_from_medium_list.js | 16 +++---- src/0-core/_fast/_prepend_small_list.js | 6 +-- src/1-digit/1-One.js | 54 ++++++++++----------- src/1-digit/2-Two.js | 58 +++++++++++------------ src/1-digit/3-Three.js | 60 ++++++++++++------------ src/1-digit/4-Four.js | 62 ++++++++++++------------- 7 files changed, 131 insertions(+), 131 deletions(-) diff --git a/src/0-core/_fast/_append_small_list.js b/src/0-core/_fast/_append_small_list.js index 13aa4b63..6971e44a 100644 --- a/src/0-core/_fast/_append_small_list.js +++ b/src/0-core/_fast/_append_small_list.js @@ -3,14 +3,14 @@ import assert from 'assert'; export default function _append_small_list(tree, list) { assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return tree.push(list[0]).push(list[1]).push(list[2]).push(list[3]); case 1: return tree.push(list[0]); case 2: return tree.push(list[0]).push(list[1]); case 3: return tree.push(list[0]).push(list[1]).push(list[2]); - case 4: - return tree.push(list[0]).push(list[1]).push(list[2]).push(list[3]); } } diff --git a/src/0-core/_fast/_from_medium_list.js b/src/0-core/_fast/_from_medium_list.js index 933949be..1eb40adb 100644 --- a/src/0-core/_fast/_from_medium_list.js +++ b/src/0-core/_fast/_from_medium_list.js @@ -8,7 +8,14 @@ export function _from_medium_list(M, list) { assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length | 0) { + switch (list.length & 0b11) { + case 0: + return new Deep( + M, + new Two(list[0], list[1]), + empty(cache(M)), + new Two(list[2], list[3]), + ); case 1: return new Single(M, list[0]); case 2: @@ -20,12 +27,5 @@ export function _from_medium_list(M, list) { empty(cache(M)), new One(list[2]), ); - case 4: - return new Deep( - M, - new Two(list[0], list[1]), - empty(cache(M)), - new Two(list[2], list[3]), - ); } } diff --git a/src/0-core/_fast/_prepend_small_list.js b/src/0-core/_fast/_prepend_small_list.js index 77097959..3385eff5 100644 --- a/src/0-core/_fast/_prepend_small_list.js +++ b/src/0-core/_fast/_prepend_small_list.js @@ -3,14 +3,14 @@ import assert from 'assert'; export default function _prepend_small_list(tree, list) { assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return tree.cons(list[3]).cons(list[2]).cons(list[1]).cons(list[0]); case 1: return tree.cons(list[0]); case 2: return tree.cons(list[1]).cons(list[0]); case 3: return tree.cons(list[2]).cons(list[1]).cons(list[0]); - case 4: - return tree.cons(list[3]).cons(list[2]).cons(list[1]).cons(list[0]); } } diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index b2d3df98..a73fdeab 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -91,18 +91,18 @@ One.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; case 1: return [node3(M, other.a, list[0], this.a)]; case 2: return [node2(M, other.a, list[0]), node2(M, list[1], this.a)]; case 3: return [node3(M, other.a, list[0], list[1]), node2(M, list[2], this.a)]; - case 4: - return [ - node3(M, other.a, list[0], list[1]), - node3(M, list[2], list[3], this.a), - ]; } }; @@ -110,7 +110,13 @@ One.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + other._node(M), + node3(M, list[0], list[1], list[2]), + node2(M, list[3], this.a), + ]; case 1: return [other._node(M), node2(M, list[0], this.a)]; case 2: @@ -120,12 +126,6 @@ One.prototype._nodes_with_list_and_two = function (M, list, other) { node3(M, other.a, other.b, list[0]), node3(M, list[1], list[2], this.a), ]; - case 4: - return [ - other._node(M), - node3(M, list[0], list[1], list[2]), - node2(M, list[3], this.a), - ]; } }; @@ -133,7 +133,13 @@ One.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + other._node(M), + node2(M, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; case 1: return [other._node(M), node2(M, list[0], this.a)]; case 2: @@ -144,12 +150,6 @@ One.prototype._nodes_with_list_and_three = function (M, list, other) { node2(M, list[0], list[1]), node2(M, list[2], this.a), ]; - case 4: - return [ - other._node(M), - node2(M, list[0], list[1]), - node3(M, list[2], list[3], this.a), - ]; } }; @@ -157,7 +157,13 @@ One.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + node3(M, list[2], list[3], this.a), + ]; case 1: return [ node3(M, other.a, other.b, other.c), @@ -175,12 +181,6 @@ One.prototype._nodes_with_list_and_four = function (M, list, other) { node2(M, other.d, list[0]), node3(M, list[1], list[2], this.a), ]; - case 4: - return [ - node3(M, other.a, other.b, other.c), - node3(M, other.d, list[0], list[1]), - node3(M, list[2], list[3], this.a), - ]; } }; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index 677914d5..e9121c23 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -96,7 +96,13 @@ Two.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node2(M, other.a, list[0]), + node3(M, list[1], list[2], list[3]), + this._node(M), + ]; case 1: return [node2(M, other.a, list[0]), this._node(M)]; case 2: @@ -107,12 +113,6 @@ Two.prototype._nodes_with_list_and_one = function (M, list, other) { node2(M, list[1], list[2]), this._node(M), ]; - case 4: - return [ - node2(M, other.a, list[0]), - node3(M, list[1], list[2], list[3]), - this._node(M), - ]; } }; @@ -120,7 +120,13 @@ Two.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, list[0]), + node2(M, list[1], list[2]), + node3(M, list[3], this.a, this.b), + ]; case 1: return [node3(M, other.a, other.b, list[0]), node2(M, this.a, this.b)]; case 2: @@ -131,12 +137,6 @@ Two.prototype._nodes_with_list_and_two = function (M, list, other) { node3(M, list[0], list[1], list[2]), node2(M, this.a, this.b), ]; - case 4: - return [ - node3(M, other.a, other.b, list[0]), - node2(M, list[1], list[2]), - node3(M, list[3], this.a, this.b), - ]; } }; @@ -144,7 +144,13 @@ Two.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node3(M, list[0], list[1], list[2]), + node3(M, list[3], this.a, this.b), + ]; case 1: return [ node3(M, other.a, other.b, other.c), @@ -162,12 +168,6 @@ Two.prototype._nodes_with_list_and_three = function (M, list, other) { node2(M, list[0], list[1]), node3(M, list[2], this.a, this.b), ]; - case 4: - return [ - node3(M, other.a, other.b, other.c), - node3(M, list[0], list[1], list[2]), - node3(M, list[3], this.a, this.b), - ]; } }; @@ -175,7 +175,14 @@ Two.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node2(M, other.a, other.b), + node3(M, other.c, other.d, list[0]), + node3(M, list[1], list[2], list[3]), + node2(M, this.a, this.b), + ]; case 1: return [ node2(M, other.a, other.b), @@ -194,13 +201,6 @@ Two.prototype._nodes_with_list_and_four = function (M, list, other) { node3(M, other.d, list[0], list[1]), node3(M, list[2], this.a, this.b), ]; - case 4: - return [ - node2(M, other.a, other.b), - node3(M, other.c, other.d, list[0]), - node3(M, list[1], list[2], list[3]), - node2(M, this.a, this.b), - ]; } }; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index bf1c1889..a67e2927 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -104,7 +104,13 @@ Three.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, list[0], list[1]), + node2(M, list[2], list[3]), + this._node(M), + ]; case 1: return [node2(M, other.a, list[0]), this._node(M)]; case 2: @@ -115,12 +121,6 @@ Three.prototype._nodes_with_list_and_one = function (M, list, other) { node2(M, list[1], list[2]), this._node(M), ]; - case 4: - return [ - node3(M, other.a, list[0], list[1]), - node2(M, list[2], list[3]), - this._node(M), - ]; } }; @@ -128,7 +128,13 @@ Three.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, list[0]), + node3(M, list[1], list[2], list[3]), + this._node(M), + ]; case 1: return [node3(M, other.a, other.b, list[0]), this._node(M)]; case 2: @@ -139,12 +145,6 @@ Three.prototype._nodes_with_list_and_two = function (M, list, other) { node3(M, list[0], list[1], list[2]), this._node(M), ]; - case 4: - return [ - node3(M, other.a, other.b, list[0]), - node3(M, list[1], list[2], list[3]), - this._node(M), - ]; } }; @@ -152,7 +152,14 @@ Three.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + other._node(M), + node2(M, list[0], list[1]), + node2(M, list[2], list[3]), + this._node(M), + ]; case 1: return [ node2(M, other.a, other.b), @@ -167,13 +174,6 @@ Three.prototype._nodes_with_list_and_three = function (M, list, other) { node3(M, list[0], list[1], list[2]), this._node(M), ]; - case 4: - return [ - other._node(M), - node2(M, list[0], list[1]), - node2(M, list[2], list[3]), - this._node(M), - ]; } }; @@ -181,7 +181,14 @@ Three.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node2(M, other.d, list[0]), + node3(M, list[1], list[2], list[3]), + this._node(M), + ]; case 1: return [ node2(M, other.a, other.b), @@ -201,13 +208,6 @@ Three.prototype._nodes_with_list_and_four = function (M, list, other) { node3(M, list[0], list[1], list[2]), this._node(M), ]; - case 4: - return [ - node3(M, other.a, other.b, other.c), - node2(M, other.d, list[0]), - node3(M, list[1], list[2], list[3]), - this._node(M), - ]; } }; diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 22f9a7fc..69a66e71 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -115,7 +115,13 @@ Four.prototype._nodes_with_list_and_one = function (M, list, other) { assert(other instanceof One); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; case 1: return [ node3(M, other.a, list[0], this.a), @@ -133,12 +139,6 @@ Four.prototype._nodes_with_list_and_one = function (M, list, other) { node2(M, list[2], this.a), node3(M, this.b, this.c, this.d), ]; - case 4: - return [ - node3(M, other.a, list[0], list[1]), - node3(M, list[2], list[3], this.a), - node3(M, this.b, this.c, this.d), - ]; } }; @@ -146,7 +146,14 @@ Four.prototype._nodes_with_list_and_two = function (M, list, other) { assert(other instanceof Two); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + other._node(M), + node3(M, list[0], list[1], list[2]), + node3(M, list[3], this.a, this.b), + node2(M, this.c, this.d), + ]; case 1: return [ other._node(M), @@ -165,13 +172,6 @@ Four.prototype._nodes_with_list_and_two = function (M, list, other) { node3(M, list[1], list[2], this.a), node3(M, this.b, this.c, this.d), ]; - case 4: - return [ - other._node(M), - node3(M, list[0], list[1], list[2]), - node3(M, list[3], this.a, this.b), - node2(M, this.c, this.d), - ]; } }; @@ -179,7 +179,14 @@ Four.prototype._nodes_with_list_and_three = function (M, list, other) { assert(other instanceof Three); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + other._node(M), + node2(M, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; case 1: return [ other._node(M), @@ -199,13 +206,6 @@ Four.prototype._nodes_with_list_and_three = function (M, list, other) { node2(M, list[2], this.a), node3(M, this.b, this.c, this.d), ]; - case 4: - return [ - other._node(M), - node2(M, list[0], list[1]), - node3(M, list[2], list[3], this.a), - node3(M, this.b, this.c, this.d), - ]; } }; @@ -213,7 +213,14 @@ Four.prototype._nodes_with_list_and_four = function (M, list, other) { assert(other instanceof Four); assert(Number.isInteger(list.length) && list.length >= 1 && list.length <= 4); // eslint-disable-next-line default-case - switch (list.length) { + switch (list.length & 0b11) { + case 0: + return [ + node3(M, other.a, other.b, other.c), + node3(M, other.d, list[0], list[1]), + node3(M, list[2], list[3], this.a), + node3(M, this.b, this.c, this.d), + ]; case 1: return [ node3(M, other.a, other.b, other.c), @@ -234,13 +241,6 @@ Four.prototype._nodes_with_list_and_four = function (M, list, other) { node3(M, list[1], list[2], this.a), node3(M, this.b, this.c, this.d), ]; - case 4: - return [ - node3(M, other.a, other.b, other.c), - node3(M, other.d, list[0], list[1]), - node3(M, list[2], list[3], this.a), - node3(M, this.b, this.c, this.d), - ]; } }; From d9681d8ac9ae966172dd3a4ffaef910da3f47ab1 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:26:43 +0200 Subject: [PATCH 48/50] :recycle: refactor: Remove empty Digit base class. --- src/0-core/split/DigitSplit.js | 25 ++++++++++++++++++++----- src/0-core/split/deepL.js | 24 +++++++++++++++++++----- src/0-core/split/deepR.js | 24 +++++++++++++++++++----- src/1-digit/0-Digit.js | 1 - src/1-digit/1-One.js | 4 +--- src/1-digit/2-Two.js | 4 +--- src/1-digit/3-Three.js | 4 +--- src/1-digit/4-Four.js | 4 +--- src/1-digit/index.js | 1 - 9 files changed, 62 insertions(+), 29 deletions(-) delete mode 100644 src/1-digit/0-Digit.js diff --git a/src/0-core/split/DigitSplit.js b/src/0-core/split/DigitSplit.js index 11611352..712136c4 100644 --- a/src/0-core/split/DigitSplit.js +++ b/src/0-core/split/DigitSplit.js @@ -1,16 +1,31 @@ import assert from 'assert'; -import {Digit} from '../../1-digit/0-Digit.js'; +import {One} from '../../1-digit/1-One.js'; +import {Two} from '../../1-digit/2-Two.js'; +import {Three} from '../../1-digit/3-Three.js'; +import {Four} from '../../1-digit/4-Four.js'; /** * DigitSplit. * - * @param {Digit} left + * @param {null|One|Two|Three|Four} left * @param {any} middle - * @param {Digit} right + * @param {null|One|Two|Three|Four} right */ export function DigitSplit(left, middle, right) { - assert(left === null || left instanceof Digit); - assert(right === null || right instanceof Digit); + assert( + left === null || + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); + assert( + right === null || + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); this._left = left; this._middle = middle; this._right = right; diff --git a/src/0-core/split/deepL.js b/src/0-core/split/deepL.js index 3f7f3693..f54c302a 100644 --- a/src/0-core/split/deepL.js +++ b/src/0-core/split/deepL.js @@ -1,19 +1,33 @@ import assert from 'assert'; -import {Digit} from '../../1-digit/0-Digit.js'; +import {One} from '../../1-digit/1-One.js'; +import {Two} from '../../1-digit/2-Two.js'; +import {Three} from '../../1-digit/3-Three.js'; +import {Four} from '../../1-digit/4-Four.js'; import {Deep, Tree} from '../../3-tree/index.js'; import delayTail from '../../4-lazy/delayTail.js'; /** * @param {any} M - * @param {Digit|null} left + * @param {null|One|Two|Three|Four} left * @param {Tree} middle - * @param {Digit} right + * @param {One|Two|Three|Four} right */ export function deepL(M, left, middle, right) { - assert(left === null || left instanceof Digit); + assert( + left === null || + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); assert(middle instanceof Tree); - assert(right instanceof Digit); + assert( + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); if (left === null) { if (middle.isEmpty()) return right._tree(M); diff --git a/src/0-core/split/deepR.js b/src/0-core/split/deepR.js index 6c7c5005..335805e5 100644 --- a/src/0-core/split/deepR.js +++ b/src/0-core/split/deepR.js @@ -1,19 +1,33 @@ import assert from 'assert'; -import {Digit} from '../../1-digit/0-Digit.js'; +import {One} from '../../1-digit/1-One.js'; +import {Two} from '../../1-digit/2-Two.js'; +import {Three} from '../../1-digit/3-Three.js'; +import {Four} from '../../1-digit/4-Four.js'; import {Deep, Tree} from '../../3-tree/index.js'; import delayInit from '../../4-lazy/delayInit.js'; /** * @param {any} M - * @param {Digit} left + * @param {One|Two|Three|Four} left * @param {Tree} middle - * @param {Digit|null} right + * @param {null|One|Two|Three|Four} right */ export function deepR(M, left, middle, right) { - assert(left instanceof Digit); + assert( + left instanceof One || + left instanceof Two || + left instanceof Three || + left instanceof Four, + ); assert(middle instanceof Tree); - assert(right === null || right instanceof Digit); + assert( + right === null || + right instanceof One || + right instanceof Two || + right instanceof Three || + right instanceof Four, + ); if (right === null) { if (middle.isEmpty()) return left._tree(M); diff --git a/src/1-digit/0-Digit.js b/src/1-digit/0-Digit.js deleted file mode 100644 index 3dc04c8b..00000000 --- a/src/1-digit/0-Digit.js +++ /dev/null @@ -1 +0,0 @@ -export function Digit() {} diff --git a/src/1-digit/1-One.js b/src/1-digit/1-One.js index a73fdeab..64b2a8eb 100644 --- a/src/1-digit/1-One.js +++ b/src/1-digit/1-One.js @@ -5,15 +5,13 @@ import {Single} from '../3-tree/implementations/1-Single.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; import delayTail from '../4-lazy/delayTail.js'; import delayInit from '../4-lazy/delayInit.js'; -import {Digit, Two, Three, Four} from './index.js'; +import {Two, Three, Four} from './index.js'; export function One(a) { this.a = a; this.v = null; } -One.prototype = new Digit(); - One.prototype.measure = function (M) { if (this.v === null) this.v = M.measure(this.a); return this.v; diff --git a/src/1-digit/2-Two.js b/src/1-digit/2-Two.js index e9121c23..2ebde3d7 100644 --- a/src/1-digit/2-Two.js +++ b/src/1-digit/2-Two.js @@ -4,7 +4,7 @@ import {DigitSplit} from '../0-core/split/DigitSplit.js'; import empty from '../5-api/empty.js'; import {cache} from '../0-core/measure/cache.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; -import {Digit, One, Three, Four} from './index.js'; +import {One, Three, Four} from './index.js'; export function Two(a, b) { this.a = a; @@ -12,8 +12,6 @@ export function Two(a, b) { this.v = null; } -Two.prototype = new Digit(); - Two.prototype.measure = function (M) { if (this.v === null) this.v = M.plus(M.measure(this.a), M.measure(this.b)); return this.v; diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index a67e2927..46670a1c 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -4,7 +4,7 @@ import {DigitSplit} from '../0-core/split/DigitSplit.js'; import empty from '../5-api/empty.js'; import {cache} from '../0-core/measure/cache.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; -import {Digit, One, Two, Four} from './index.js'; +import {One, Two, Four} from './index.js'; export function Three(a, b, c) { this.a = a; @@ -13,8 +13,6 @@ export function Three(a, b, c) { this.v = null; } -Three.prototype = new Digit(); - Three.prototype.measure = function (M) { if (this.v === null) this.v = M.plus( diff --git a/src/1-digit/4-Four.js b/src/1-digit/4-Four.js index 69a66e71..4bef55e5 100644 --- a/src/1-digit/4-Four.js +++ b/src/1-digit/4-Four.js @@ -4,7 +4,7 @@ import {DigitSplit} from '../0-core/split/DigitSplit.js'; import {node2, node3} from '../2-node/index.js'; import empty from '../5-api/empty.js'; import {Deep} from '../3-tree/implementations/2-Deep.js'; -import {Digit, One, Two, Three} from './index.js'; +import {One, Two, Three} from './index.js'; export function Four(a, b, c, d) { this.a = a; @@ -14,8 +14,6 @@ export function Four(a, b, c, d) { this.v = null; } -Four.prototype = new Digit(); - Four.prototype.measure = function (M) { if (this.v === null) this.v = M.plus( diff --git a/src/1-digit/index.js b/src/1-digit/index.js index bf421f25..c8a01dcf 100644 --- a/src/1-digit/index.js +++ b/src/1-digit/index.js @@ -1,4 +1,3 @@ -export * from './0-Digit.js'; export * from './1-One.js'; export * from './2-Two.js'; export * from './3-Three.js'; From 2e2b620dc5ee8e7c8cc5409355fae6bb651c5591 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:27:21 +0200 Subject: [PATCH 49/50] :recycle: refactor(nodes): Use more precise imports. --- src/2-node/2-Node2.js | 2 +- src/2-node/3-Node3.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/2-node/2-Node2.js b/src/2-node/2-Node2.js index d44229f3..fabcdd33 100644 --- a/src/2-node/2-Node2.js +++ b/src/2-node/2-Node2.js @@ -1,4 +1,4 @@ -import {Two} from '../1-digit/index.js'; +import {Two} from '../1-digit/2-Two.js'; export function Node2(v, a, b) { this.v = v; diff --git a/src/2-node/3-Node3.js b/src/2-node/3-Node3.js index 152eb29e..3c0b60cf 100644 --- a/src/2-node/3-Node3.js +++ b/src/2-node/3-Node3.js @@ -1,4 +1,4 @@ -import {Three} from '../1-digit/index.js'; +import {Three} from '../1-digit/3-Three.js'; export function Node3(v, a, b, c) { this.v = v; From 539c048bc0ed7ae5b68fc9722d9581fec2d25b36 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Thu, 14 Oct 2021 11:27:50 +0200 Subject: [PATCH 50/50] :books: docs(Three): Better wording in _UNSAFE_push NOTE. --- src/1-digit/3-Three.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/1-digit/3-Three.js b/src/1-digit/3-Three.js index 46670a1c..da1b5124 100644 --- a/src/1-digit/3-Three.js +++ b/src/1-digit/3-Three.js @@ -226,7 +226,7 @@ Three.prototype._isolated_push = function (parent, value) { Three.prototype._UNSAFE_push = function (parent, value) { assert(parent._right === this); parent._middle = parent._middle._UNSAFE_push(this._node(parent.M)); - // NOTE the following is dangerous if alternating push and init + // NOTE the following is dangerous if alternating _UNSAFE_push and init parent._right = new One(value); // TODO maybe final output can be fixed return parent;