diff --git a/.gitignore b/.gitignore index 5e641c5..7c4496b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ .DS_Store +# node +node_modules/ + # 大文件 - 使用分片版本替代 static/libs/dict/jmdict-eng-3.6.1.json @@ -10,4 +13,4 @@ __pycache__/ # 临时文件 *.tmp -*.log \ No newline at end of file +*.log diff --git a/node_modules/.bin/errno b/node_modules/.bin/errno deleted file mode 120000 index 5a98e53..0000000 --- a/node_modules/.bin/errno +++ /dev/null @@ -1 +0,0 @@ -../errno/cli.js \ No newline at end of file diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild deleted file mode 120000 index c83ac07..0000000 --- a/node_modules/.bin/esbuild +++ /dev/null @@ -1 +0,0 @@ -../esbuild/bin/esbuild \ No newline at end of file diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid deleted file mode 120000 index e2be547..0000000 --- a/node_modules/.bin/nanoid +++ /dev/null @@ -1 +0,0 @@ -../nanoid/bin/nanoid.cjs \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build b/node_modules/.bin/node-gyp-build deleted file mode 120000 index 671c6eb..0000000 --- a/node_modules/.bin/node-gyp-build +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/bin.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build-optional b/node_modules/.bin/node-gyp-build-optional deleted file mode 120000 index 46d347e..0000000 --- a/node_modules/.bin/node-gyp-build-optional +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/optional.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp-build-test b/node_modules/.bin/node-gyp-build-test deleted file mode 120000 index d11de1b..0000000 --- a/node_modules/.bin/node-gyp-build-test +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/build-test.js \ No newline at end of file diff --git a/node_modules/.bin/rollup b/node_modules/.bin/rollup deleted file mode 120000 index 5939621..0000000 --- a/node_modules/.bin/rollup +++ /dev/null @@ -1 +0,0 @@ -../rollup/dist/bin/rollup \ No newline at end of file diff --git a/node_modules/.bin/vite b/node_modules/.bin/vite deleted file mode 120000 index 6d1e3be..0000000 --- a/node_modules/.bin/vite +++ /dev/null @@ -1 +0,0 @@ -../vite/bin/vite.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index b20fb30..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "name": "fudoki-js", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz", - "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "license": "MIT", - "dependencies": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/doublearray": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/doublearray/-/doublearray-0.0.2.tgz", - "integrity": "sha512-aw55FtZzT6AmiamEj2kvmR6BuFqvYgKZUkfQ7teqVRNqD5UE0rw8IeW/3gieHNKQ5sPuDKlljWEn4bzv5+1bHw==", - "license": "MIT" - }, - "node_modules/errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "license": "MIT", - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/immediate": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", - "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", - "license": "MIT" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/jmdict-simplified-node": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/jmdict-simplified-node/-/jmdict-simplified-node-1.1.2.tgz", - "integrity": "sha512-rMm/bp59l0Mp0phspWhZporBQw8mcA80xlRSr+Txzkl+woGJ4uK0aL5rMWW0czn6V7EZ3RxPBBaLQz0ZTR8cFg==", - "license": "Unlicense", - "dependencies": { - "leveldown": "^5.4.1", - "levelup": "^4.3.2" - } - }, - "node_modules/kuromoji": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/kuromoji/-/kuromoji-0.1.2.tgz", - "integrity": "sha512-V0dUf+C2LpcPEXhoHLMAop/bOht16Dyr+mDiIE39yX3vqau7p80De/koFqpiTcL1zzdZlc3xuHZ8u5gjYRfFaQ==", - "license": "Apache-2.0", - "dependencies": { - "async": "^2.0.1", - "doublearray": "0.0.2", - "zlibjs": "^0.3.1" - } - }, - "node_modules/kuroshiro": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/kuroshiro/-/kuroshiro-1.2.0.tgz", - "integrity": "sha512-yBGCK9oDOY3LGZ/KXaN9m7ADcAuSczOR2FoMRYwHLUlis3/o/uxdMVROAjENFO0NQJgALhIdWxI/vIBVrMCk9w==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.14.0" - }, - "engines": { - "node": ">=6.5.0" - } - }, - "node_modules/kuroshiro-analyzer-kuromoji": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kuroshiro-analyzer-kuromoji/-/kuroshiro-analyzer-kuromoji-1.1.0.tgz", - "integrity": "sha512-BSJFhpsQdPwfFLfjKxfLA9iL+/PC6LCR9vgwgb5Jc7jZwk9ilX8SAV6CwhAQZY611tiuhbB52ONYKDO8hgY1bA==", - "license": "MIT", - "dependencies": { - "kuromoji": "^0.1.1" - } - }, - "node_modules/level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "license": "MIT", - "dependencies": { - "errno": "~0.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "license": "MIT", - "dependencies": { - "xtend": "^4.0.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/leveldown": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz", - "integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==", - "deprecated": "Superseded by classic-level (https://github.com/Level/community#faq)", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "abstract-leveldown": "~6.2.1", - "napi-macros": "~2.0.0", - "node-gyp-build": "~4.1.0" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", - "license": "MIT", - "dependencies": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", - "license": "MIT" - }, - "node_modules/node-gyp-build": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz", - "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==", - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "license": "MIT" - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rollup": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", - "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.3", - "@rollup/rollup-android-arm64": "4.52.3", - "@rollup/rollup-darwin-arm64": "4.52.3", - "@rollup/rollup-darwin-x64": "4.52.3", - "@rollup/rollup-freebsd-arm64": "4.52.3", - "@rollup/rollup-freebsd-x64": "4.52.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.3", - "@rollup/rollup-linux-arm-musleabihf": "4.52.3", - "@rollup/rollup-linux-arm64-gnu": "4.52.3", - "@rollup/rollup-linux-arm64-musl": "4.52.3", - "@rollup/rollup-linux-loong64-gnu": "4.52.3", - "@rollup/rollup-linux-ppc64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-musl": "4.52.3", - "@rollup/rollup-linux-s390x-gnu": "4.52.3", - "@rollup/rollup-linux-x64-gnu": "4.52.3", - "@rollup/rollup-linux-x64-musl": "4.52.3", - "@rollup/rollup-openharmony-arm64": "4.52.3", - "@rollup/rollup-win32-arm64-msvc": "4.52.3", - "@rollup/rollup-win32-ia32-msvc": "4.52.3", - "@rollup/rollup-win32-x64-gnu": "4.52.3", - "@rollup/rollup-win32-x64-msvc": "4.52.3", - "fsevents": "~2.3.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/vite": { - "version": "5.4.20", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.20.tgz", - "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/zlibjs": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.1.tgz", - "integrity": "sha512-+J9RrgTKOmlxFSDHo0pI1xM6BLVUv+o0ZT9ANtCxGkjIVCCUdx9alUF8Gm+dGLKbkkkidWIHFDZHDMpfITt4+w==", - "license": "MIT", - "engines": { - "node": "*" - } - } - } -} diff --git a/node_modules/@babel/runtime/LICENSE b/node_modules/@babel/runtime/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/runtime/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/runtime/README.md b/node_modules/@babel/runtime/README.md deleted file mode 100644 index 2f3368e..0000000 --- a/node_modules/@babel/runtime/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/runtime - -> babel's modular runtime helpers - -See our website [@babel/runtime](https://babeljs.io/docs/babel-runtime) for more information. - -## Install - -Using npm: - -```sh -npm install --save @babel/runtime -``` - -or using yarn: - -```sh -yarn add @babel/runtime -``` diff --git a/node_modules/@babel/runtime/helpers/AwaitValue.js b/node_modules/@babel/runtime/helpers/AwaitValue.js deleted file mode 100644 index 52a7e69..0000000 --- a/node_modules/@babel/runtime/helpers/AwaitValue.js +++ /dev/null @@ -1,4 +0,0 @@ -function _AwaitValue(t) { - this.wrapped = t; -} -module.exports = _AwaitValue, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/OverloadYield.js b/node_modules/@babel/runtime/helpers/OverloadYield.js deleted file mode 100644 index 0eca88c..0000000 --- a/node_modules/@babel/runtime/helpers/OverloadYield.js +++ /dev/null @@ -1,4 +0,0 @@ -function _OverloadYield(e, d) { - this.v = e, this.k = d; -} -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js b/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js deleted file mode 100644 index 0ff780e..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +++ /dev/null @@ -1,9 +0,0 @@ -function _applyDecoratedDescriptor(i, e, r, n, l) { - var a = {}; - return Object.keys(n).forEach(function (i) { - a[i] = n[i]; - }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { - return n(i, e, r) || r; - }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; -} -module.exports = _applyDecoratedDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs.js b/node_modules/@babel/runtime/helpers/applyDecs.js deleted file mode 100644 index 3770c5a..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs.js +++ /dev/null @@ -1,236 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function old_createMetadataMethodsForProperty(e, t, a, r) { - return { - getMetadata: function getMetadata(o) { - old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); - var i = e[o]; - if (void 0 !== i) if (1 === t) { - var n = i["public"]; - if (void 0 !== n) return n[a]; - } else if (2 === t) { - var l = i["private"]; - if (void 0 !== l) return l.get(a); - } else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; - }, - setMetadata: function setMetadata(o, i) { - old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); - var n = e[o]; - if (void 0 === n && (n = e[o] = {}), 1 === t) { - var l = n["public"]; - void 0 === l && (l = n["public"] = {}), l[a] = i; - } else if (2 === t) { - var s = n.priv; - void 0 === s && (s = n["private"] = new Map()), s.set(a, i); - } else n.constructor = i; - } - }; -} -function old_convertMetadataMapToFinal(e, t) { - var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], - r = Object.getOwnPropertySymbols(t); - if (0 !== r.length) { - for (var o = 0; o < r.length; o++) { - var i = r[o], - n = t[i], - l = a ? a[i] : null, - s = n["public"], - c = l ? l["public"] : null; - s && c && Object.setPrototypeOf(s, c); - var d = n["private"]; - if (d) { - var u = Array.from(d.values()), - f = l ? l["private"] : null; - f && (u = u.concat(f)), n["private"] = u; - } - l && Object.setPrototypeOf(n, l); - } - a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; - } -} -function old_createAddInitializerMethod(e, t) { - return function (a) { - old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); - }; -} -function old_memberDec(e, t, a, r, o, i, n, l, s) { - var c; - switch (i) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var d, - u, - f = { - kind: c, - name: l ? "#" + t : toPropertyKey(t), - isStatic: n, - isPrivate: l - }, - p = { - v: !1 - }; - if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { - d = 2, u = Symbol(t); - var v = {}; - 0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { - return a.value; - } : (1 !== i && 3 !== i || (v.get = function () { - return a.get.call(this); - }), 1 !== i && 4 !== i || (v.set = function (e) { - a.set.call(this, e); - })), f.access = v; - } else d = 1, u = t; - try { - return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); - } finally { - p.v = !0; - } -} -function old_assertNotFinished(e, t) { - if (e.v) throw Error("attempted to call " + t + " after decoration was finished"); -} -function old_assertMetadataKey(e) { - if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); -} -function old_assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); -} -function old_assertValidReturnValue(e, t) { - var a = _typeof(t); - if (1 === e) { - if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); - } else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); -} -function old_getInit(e) { - var t; - return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t; -} -function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { - var c, - d, - u, - f, - p, - v, - y, - h = a[0]; - if (n ? (0 === o || 1 === o ? (c = { - get: a[3], - set: a[4] - }, u = "get") : 3 === o ? (c = { - get: a[3] - }, u = "get") : 4 === o ? (c = { - set: a[3] - }, u = "set") : c = { - value: a[3] - }, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? f = { - get: c.get, - set: c.set - } : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p);else for (var m = h.length - 1; m >= 0; m--) { - var b; - void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); - } - if (0 === o || 1 === o) { - if (void 0 === d) d = function d(e, t) { - return t; - };else if ("function" != typeof d) { - var g = d; - d = function d(e, t) { - for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); - return a; - }; - } else { - var _ = d; - d = function d(e, t) { - return _.call(e, t); - }; - } - e.push(d); - } - 0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === o ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, r, c)); -} -function old_applyMemberDecs(e, t, a, r, o) { - for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { - var d = o[c]; - if (Array.isArray(d)) { - var u, - f, - p, - v = d[1], - y = d[2], - h = d.length > 3, - m = v >= 5; - if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { - var b = m ? s : l, - g = b.get(y) || 0; - if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); - !g && v > 2 ? b.set(y, v) : b.set(y, !0); - } - old_applyMemberDec(e, u, d, y, v, m, h, f, p); - } - } - old_pushInitializers(e, i), old_pushInitializers(e, n); -} -function old_pushInitializers(e, t) { - t && e.push(function (e) { - for (var a = 0; a < t.length; a++) t[a].call(e); - return e; - }); -} -function old_applyClassDecs(e, t, a, r) { - if (r.length > 0) { - for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { - var s = { - v: !1 - }; - try { - var c = Object.assign({ - kind: "class", - name: n, - addInitializer: old_createAddInitializerMethod(o, s) - }, old_createMetadataMethodsForProperty(a, 0, n, s)), - d = r[l](i, c); - } finally { - s.v = !0; - } - void 0 !== d && (old_assertValidReturnValue(10, d), i = d); - } - e.push(i, function () { - for (var e = 0; e < o.length; e++) o[e].call(i); - }); - } -} -function applyDecs(e, t, a) { - var r = [], - o = {}, - i = {}; - return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; -} -module.exports = applyDecs, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs2203.js b/node_modules/@babel/runtime/helpers/applyDecs2203.js deleted file mode 100644 index 5af267c..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs2203.js +++ /dev/null @@ -1,184 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function applyDecs2203Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, a, n, i, s, o) { - var c; - switch (n) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: s ? "#" + t : t, - "static": i, - "private": s - }, - p = { - v: !1 - }; - 0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === n ? l = function l() { - return r.value; - } : (1 !== n && 3 !== n || (l = function l() { - return r.get.call(this); - }), 1 !== n && 4 !== n || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(o, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, a, n, i, s, o) { - var c, - l, - u, - f, - p, - d, - h = r[0]; - if (s ? c = 0 === n || 1 === n ? { - get: r[3], - set: r[4] - } : 3 === n ? { - get: r[3] - } : 4 === n ? { - set: r[3] - } : { - value: r[3] - } : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { - get: c.get, - set: c.set - } : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f);else for (var v = h.length - 1; v >= 0; v--) { - var g; - void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); - } - if (0 === n || 1 === n) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var y = l; - l = function l(e, t) { - for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); - return r; - }; - } else { - var m = l; - l = function l(e, t) { - return m.call(e, t); - }; - } - e.push(l); - } - 0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { - return u.get.call(e, t); - }), e.push(function (e, t) { - return u.set.call(e, t); - })) : 2 === n ? e.push(u) : e.push(function (e, t) { - return u.call(e, t); - }) : Object.defineProperty(t, a, c)); - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - var a = []; - return function (e, t, r) { - for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { - var c = r[o]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { - var v = h ? s : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(e, l, c, p, f, h, d, u); - } - } - pushInitializers(e, a), pushInitializers(e, n); - }(a, e, t), function (e, t, r) { - if (r.length > 0) { - for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { - var o = { - v: !1 - }; - try { - var c = r[s](n, { - kind: "class", - name: i, - addInitializer: createAddInitializerMethod(a, o) - }); - } finally { - o.v = !0; - } - void 0 !== c && (assertValidReturnValue(10, c), n = c); - } - e.push(n, function () { - for (var e = 0; e < a.length; e++) a[e].call(n); - }); - } - }(a, e, r), a; - }; -} -var applyDecs2203Impl; -function applyDecs2203(e, t, r) { - return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); -} -module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs2203R.js b/node_modules/@babel/runtime/helpers/applyDecs2203R.js deleted file mode 100644 index 1be7f5e..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs2203R.js +++ /dev/null @@ -1,191 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2203RFactory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, n, a, i, o, s) { - var c; - switch (a) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: o ? "#" + t : toPropertyKey(t), - "static": i, - "private": o - }, - p = { - v: !1 - }; - 0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === a ? l = function l() { - return r.value; - } : (1 !== a && 3 !== a || (l = function l() { - return r.get.call(this); - }), 1 !== a && 4 !== a || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(s, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, n, a, i, o, s) { - var c, - l, - u, - f, - p, - d, - h, - v = r[0]; - if (o ? (0 === a || 1 === a ? (c = { - get: r[3], - set: r[4] - }, u = "get") : 3 === a ? (c = { - get: r[3] - }, u = "get") : 4 === a ? (c = { - set: r[3] - }, u = "set") : c = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { - get: c.get, - set: c.set - } : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p);else for (var g = v.length - 1; g >= 0; g--) { - var y; - void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var m = l; - l = function l(e, t) { - for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); - return r; - }; - } else { - var b = l; - l = function l(e, t) { - return b.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === a ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, n, c)); - } - function applyMemberDecs(e, t) { - for (var r, n, a = [], i = new Map(), o = new Map(), s = 0; s < t.length; s++) { - var c = t[s]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { - var v = h ? o : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(a, l, c, p, f, h, d, u); - } - } - return pushInitializers(a, r), pushInitializers(a, n), a; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - return { - e: applyMemberDecs(e, t), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var o = { - v: !1 - }; - try { - var s = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, o) - }); - } finally { - o.v = !0; - } - void 0 !== s && (assertValidReturnValue(10, s), n = s); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2203R(e, t, r) { - return (module.exports = applyDecs2203R = applyDecs2203RFactory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r); -} -module.exports = applyDecs2203R, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs2301.js b/node_modules/@babel/runtime/helpers/applyDecs2301.js deleted file mode 100644 index 577eee8..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs2301.js +++ /dev/null @@ -1,222 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2301Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function assertInstanceIfPrivate(e, t) { - if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); - } - function memberDec(e, t, r, n, a, i, s, o, c) { - var u; - switch (a) { - case 1: - u = "accessor"; - break; - case 2: - u = "method"; - break; - case 3: - u = "getter"; - break; - case 4: - u = "setter"; - break; - default: - u = "field"; - } - var l, - f, - p = { - kind: u, - name: s ? "#" + t : toPropertyKey(t), - "static": i, - "private": s - }, - d = { - v: !1 - }; - if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { - if (2 === a) l = function l(e) { - return assertInstanceIfPrivate(c, e), r.value; - };else { - var h = 0 === a || 1 === a; - (h || 3 === a) && (l = s ? function (e) { - return assertInstanceIfPrivate(c, e), r.get.call(e); - } : function (e) { - return r.get.call(e); - }), (h || 4 === a) && (f = s ? function (e, t) { - assertInstanceIfPrivate(c, e), r.set.call(e, t); - } : function (e, t) { - r.set.call(e, t); - }); - } - } else l = function l(e) { - return e[t]; - }, 0 === a && (f = function f(e, r) { - e[t] = r; - }); - var v = s ? c.bind() : function (e) { - return t in e; - }; - p.access = l && f ? { - get: l, - set: f, - has: v - } : l ? { - get: l, - has: v - } : { - set: f, - has: v - }; - try { - return e(o, p); - } finally { - d.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function curryThis2(e) { - return function (t) { - e(this, t); - }; - } - function applyMemberDec(e, t, r, n, a, i, s, o, c) { - var u, - l, - f, - p, - d, - h, - v, - y, - g = r[0]; - if (s ? (0 === a || 1 === a ? (u = { - get: (d = r[3], function () { - return d(this); - }), - set: curryThis2(r[4]) - }, f = "get") : 3 === a ? (u = { - get: r[3] - }, f = "get") : 4 === a ? (u = { - set: r[3] - }, f = "set") : u = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = { - get: u.get, - set: u.set - } : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h);else for (var m = g.length - 1; m >= 0; m--) { - var b; - void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var I = l; - l = function l(e, t) { - for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); - return r; - }; - } else { - var w = l; - l = function l(e, t) { - return w.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { - return p.get.call(e, t); - }), e.push(function (e, t) { - return p.set.call(e, t); - })) : 2 === a ? e.push(p) : e.push(function (e, t) { - return p.call(e, t); - }) : Object.defineProperty(t, n, u)); - } - function applyMemberDecs(e, t, r) { - for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { - var l = t[u]; - if (Array.isArray(l)) { - var f, - p, - d = l[1], - h = l[2], - v = l.length > 3, - y = d >= 5, - g = r; - if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { - return checkInRHS(t) === e; - }), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { - var m = y ? c : o, - b = m.get(h) || 0; - if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - !b && d > 2 ? m.set(h, d) : m.set(h, !0); - } - applyMemberDec(s, f, l, h, d, y, v, p, g); - } - } - return pushInitializers(s, n), pushInitializers(s, a), s; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r, n) { - return { - e: applyMemberDecs(e, t, n), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var s = { - v: !1 - }; - try { - var o = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, s) - }); - } finally { - s.v = !0; - } - void 0 !== o && (assertValidReturnValue(10, o), n = o); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2301(e, t, r, n) { - return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r, n); -} -module.exports = applyDecs2301, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs2305.js b/node_modules/@babel/runtime/helpers/applyDecs2305.js deleted file mode 100644 index 744c352..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs2305.js +++ /dev/null @@ -1,133 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2305(e, t, r, n, o, a) { - function i(e, t, r) { - return function (n, o) { - return r && r(n), e[t].call(n, o); - }; - } - function c(e, t) { - for (var r = 0; r < e.length; r++) e[r].call(t); - return t; - } - function s(e, t, r, n) { - if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); - return e; - } - function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { - function m(e) { - if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var y, - v = t[0], - g = t[3], - b = !u; - if (!b) { - r || Array.isArray(v) || (v = [v]); - var w = {}, - S = [], - A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; - f ? (p || d ? w = { - get: setFunctionName(function () { - return g(this); - }, n, "get"), - set: function set(e) { - t[4](this, e); - } - } : w[A] = g, p || setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); - } - for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { - var D = v[j], - E = r ? v[j - 1] : void 0, - I = {}, - O = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: n, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - s(t, "An initializer", "be", !0), c.push(t); - }.bind(null, I) - }; - try { - if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { - var k, F; - O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { - return m(e), w.value; - } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { - return e[n]; - }, (o < 2 || 4 === o) && (F = function F(e, t) { - e[n] = t; - })); - var N = O.access = { - has: f ? h.bind() : function (e) { - return n in e; - } - }; - if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { - get: w.get, - set: w.set - } : w[A], O), d) { - if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); - } - } finally { - I.v = !0; - } - } - return (p || d) && u.push(function (e, t) { - for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); - return t; - }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; - } - function u(e, t) { - return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { - configurable: !0, - enumerable: !0, - value: t - }); - } - if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; - var f = Object.create(null == l ? null : l), - p = function (e, t, r, n) { - var o, - a, - i = [], - s = function s(t) { - return checkInRHS(t) === e; - }, - u = new Map(); - function l(e) { - e && i.push(c.bind(null, e)); - } - for (var f = 0; f < t.length; f++) { - var p = t[f]; - if (Array.isArray(p)) { - var d = p[1], - h = p[2], - m = p.length > 3, - y = 16 & d, - v = !!(8 & d), - g = 0 == (d &= 7), - b = h + "/" + v; - if (!g && !m) { - var w = u.get(b); - if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - u.set(b, !(d > 2) || d); - } - applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); - } - } - return l(o), l(a), i; - }(e, t, o, f); - return r.length || u(e, f), { - e: p, - get c() { - var t = []; - return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; - } - }; -} -module.exports = applyDecs2305, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/applyDecs2311.js b/node_modules/@babel/runtime/helpers/applyDecs2311.js deleted file mode 100644 index 5c7ed77..0000000 --- a/node_modules/@babel/runtime/helpers/applyDecs2311.js +++ /dev/null @@ -1,124 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var checkInRHS = require("./checkInRHS.js"); -var setFunctionName = require("./setFunctionName.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function applyDecs2311(e, t, n, r, o, i) { - var a, - c, - u, - s, - f, - l, - p, - d = Symbol.metadata || Symbol["for"]("Symbol.metadata"), - m = Object.defineProperty, - h = Object.create, - y = [h(null), h(null)], - v = t.length; - function g(t, n, r) { - return function (o, i) { - n && (i = o, o = e); - for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); - return r ? i : o; - }; - } - function b(e, t, n, r) { - if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); - return e; - } - function applyDec(e, t, n, r, o, i, u, s, f, l, p) { - function d(e) { - if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var h = [].concat(t[0]), - v = t[3], - w = !u, - D = 1 === o, - S = 3 === o, - j = 4 === o, - E = 2 === o; - function I(t, n, r) { - return function (o, i) { - return n && (i = o, o = e), r && r(o), P[t].call(o, i); - }; - } - if (!w) { - var P = {}, - k = [], - F = S ? "get" : j || D ? "set" : "value"; - if (f ? (l || D ? P = { - get: setFunctionName(function () { - return v(this); - }, r, "get"), - set: function set(e) { - t[4](this, e); - } - } : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { - if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); - y[+s][r] = o < 3 ? 1 : o; - } - } - for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { - var T = b(h[O], "A decorator", "be", !0), - z = n ? h[O - 1] : void 0, - A = {}, - H = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: r, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); - b(t, "An initializer", "be", !0), i.push(t); - }.bind(null, A) - }; - if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = { - has: f ? p.bind() : function (e) { - return r in e; - } - }, j || (c.get = f ? E ? function (e) { - return d(e), P.value; - } : I("get", 0, d) : function (e) { - return e[r]; - }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { - e[r] = t; - }), N = T.call(z, D ? { - get: P.get, - set: P.set - } : P[F], H), A.v = 1, D) { - if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); - } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); - } - return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; - } - function w(e) { - return m(e, d, { - configurable: !0, - enumerable: !0, - value: a - }); - } - return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) { - e && f.push(g(e)); - }, p = function p(t, r) { - for (var i = 0; i < n.length; i++) { - var a = n[i], - c = a[1], - l = 7 & c; - if ((8 & c) == t && !l == r) { - var p = a[2], - d = !!a[3], - m = 16 & c; - applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { - return checkInRHS(t) === e; - } : o); - } - } - }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { - e: c, - get c() { - var n = []; - return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; - } - }; -} -module.exports = applyDecs2311, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/arrayLikeToArray.js b/node_modules/@babel/runtime/helpers/arrayLikeToArray.js deleted file mode 100644 index 19787e3..0000000 --- a/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +++ /dev/null @@ -1,6 +0,0 @@ -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/arrayWithHoles.js b/node_modules/@babel/runtime/helpers/arrayWithHoles.js deleted file mode 100644 index 78bdd93..0000000 --- a/node_modules/@babel/runtime/helpers/arrayWithHoles.js +++ /dev/null @@ -1,4 +0,0 @@ -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js b/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js deleted file mode 100644 index 42218f5..0000000 --- a/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +++ /dev/null @@ -1,5 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return arrayLikeToArray(r); -} -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/assertClassBrand.js b/node_modules/@babel/runtime/helpers/assertClassBrand.js deleted file mode 100644 index e63ed8f..0000000 --- a/node_modules/@babel/runtime/helpers/assertClassBrand.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertClassBrand(e, t, n) { - if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; - throw new TypeError("Private element is not present on this object"); -} -module.exports = _assertClassBrand, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/assertThisInitialized.js b/node_modules/@babel/runtime/helpers/assertThisInitialized.js deleted file mode 100644 index 02594fb..0000000 --- a/node_modules/@babel/runtime/helpers/assertThisInitialized.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js b/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js deleted file mode 100644 index 023568e..0000000 --- a/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +++ /dev/null @@ -1,24 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _asyncGeneratorDelegate(t) { - var e = {}, - n = !1; - function pump(e, r) { - return n = !0, r = new Promise(function (n) { - n(t[e](r)); - }), { - done: !1, - value: new OverloadYield(r, 1) - }; - } - return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { - return this; - }, e.next = function (t) { - return n ? (n = !1, t) : pump("next", t); - }, "function" == typeof t["throw"] && (e["throw"] = function (t) { - if (n) throw n = !1, t; - return pump("throw", t); - }), "function" == typeof t["return"] && (e["return"] = function (t) { - return n ? (n = !1, t) : pump("return", t); - }), e; -} -module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/asyncIterator.js b/node_modules/@babel/runtime/helpers/asyncIterator.js deleted file mode 100644 index 9c0c95c..0000000 --- a/node_modules/@babel/runtime/helpers/asyncIterator.js +++ /dev/null @@ -1,45 +0,0 @@ -function _asyncIterator(r) { - var n, - t, - o, - e = 2; - for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { - if (t && null != (n = r[t])) return n.call(r); - if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); - t = "@@asyncIterator", o = "@@iterator"; - } - throw new TypeError("Object is not async iterable"); -} -function AsyncFromSyncIterator(r) { - function AsyncFromSyncIteratorContinuation(r) { - if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); - var n = r.done; - return Promise.resolve(r.value).then(function (r) { - return { - value: r, - done: n - }; - }); - } - return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { - this.s = r, this.n = r.next; - }, AsyncFromSyncIterator.prototype = { - s: null, - n: null, - next: function next() { - return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); - }, - "return": function _return(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.resolve({ - value: r, - done: !0 - }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - }, - "throw": function _throw(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - } - }, new AsyncFromSyncIterator(r); -} -module.exports = _asyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/asyncToGenerator.js b/node_modules/@babel/runtime/helpers/asyncToGenerator.js deleted file mode 100644 index a080339..0000000 --- a/node_modules/@babel/runtime/helpers/asyncToGenerator.js +++ /dev/null @@ -1,26 +0,0 @@ -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js b/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js deleted file mode 100644 index 2d6fab9..0000000 --- a/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +++ /dev/null @@ -1,5 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _awaitAsyncGenerator(e) { - return new OverloadYield(e, 0); -} -module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/callSuper.js b/node_modules/@babel/runtime/helpers/callSuper.js deleted file mode 100644 index 38eaf7f..0000000 --- a/node_modules/@babel/runtime/helpers/callSuper.js +++ /dev/null @@ -1,7 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var possibleConstructorReturn = require("./possibleConstructorReturn.js"); -function _callSuper(t, o, e) { - return o = getPrototypeOf(o), possibleConstructorReturn(t, isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf(t).constructor) : o.apply(t, e)); -} -module.exports = _callSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/checkInRHS.js b/node_modules/@babel/runtime/helpers/checkInRHS.js deleted file mode 100644 index 4eea13d..0000000 --- a/node_modules/@babel/runtime/helpers/checkInRHS.js +++ /dev/null @@ -1,6 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _checkInRHS(e) { - if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); - return e; -} -module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js b/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js deleted file mode 100644 index 33ad54c..0000000 --- a/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +++ /dev/null @@ -1,4 +0,0 @@ -function _checkPrivateRedeclaration(e, t) { - if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); -} -module.exports = _checkPrivateRedeclaration, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js b/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js deleted file mode 100644 index 9998b83..0000000 --- a/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +++ /dev/null @@ -1,10 +0,0 @@ -function _classApplyDescriptorDestructureSet(e, t) { - if (t.set) return "__destrObj" in t || (t.__destrObj = { - set value(r) { - t.set.call(e, r); - } - }), t.__destrObj; - if (!t.writable) throw new TypeError("attempted to set read only private field"); - return t; -} -module.exports = _classApplyDescriptorDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js b/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js deleted file mode 100644 index ab62724..0000000 --- a/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classApplyDescriptorGet(e, t) { - return t.get ? t.get.call(e) : t.value; -} -module.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js b/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js deleted file mode 100644 index 0975f95..0000000 --- a/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +++ /dev/null @@ -1,7 +0,0 @@ -function _classApplyDescriptorSet(e, t, l) { - if (t.set) t.set.call(e, l);else { - if (!t.writable) throw new TypeError("attempted to set read only private field"); - t.value = l; - } -} -module.exports = _classApplyDescriptorSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classCallCheck.js b/node_modules/@babel/runtime/helpers/classCallCheck.js deleted file mode 100644 index 21b8390..0000000 --- a/node_modules/@babel/runtime/helpers/classCallCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js b/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js deleted file mode 100644 index 7520f74..0000000 --- a/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classCheckPrivateStaticAccess(s, a, r) { - return assertClassBrand(a, s, r); -} -module.exports = _classCheckPrivateStaticAccess, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js b/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js deleted file mode 100644 index 7f70395..0000000 --- a/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCheckPrivateStaticFieldDescriptor(t, e) { - if (void 0 === t) throw new TypeError("attempted to " + e + " private static field before its declaration"); -} -module.exports = _classCheckPrivateStaticFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js b/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js deleted file mode 100644 index be855be..0000000 --- a/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +++ /dev/null @@ -1,5 +0,0 @@ -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classExtractFieldDescriptor(e, t) { - return classPrivateFieldGet2(t, e); -} -module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classNameTDZError.js b/node_modules/@babel/runtime/helpers/classNameTDZError.js deleted file mode 100644 index 8141ff8..0000000 --- a/node_modules/@babel/runtime/helpers/classNameTDZError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classNameTDZError(e) { - throw new ReferenceError('Class "' + e + '" cannot be referenced in computed property keys.'); -} -module.exports = _classNameTDZError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js b/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js deleted file mode 100644 index 97c764d..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldDestructureSet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorDestructureSet(e, r); -} -module.exports = _classPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js b/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js deleted file mode 100644 index bbee142..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldGet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorGet(e, r); -} -module.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js b/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js deleted file mode 100644 index d4c271c..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateFieldGet2(s, a) { - return s.get(assertClassBrand(s, a)); -} -module.exports = _classPrivateFieldGet2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js b/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js deleted file mode 100644 index a290c19..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js"); -function _classPrivateFieldInitSpec(e, t, a) { - checkPrivateRedeclaration(e, t), t.set(e, a); -} -module.exports = _classPrivateFieldInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js deleted file mode 100644 index f9e46f2..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +++ /dev/null @@ -1,5 +0,0 @@ -function _classPrivateFieldBase(e, t) { - if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); - return e; -} -module.exports = _classPrivateFieldBase, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js b/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js deleted file mode 100644 index 5dc687f..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var id = 0; -function _classPrivateFieldKey(e) { - return "__private_" + id++ + "_" + e; -} -module.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js b/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js deleted file mode 100644 index f3746e7..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); -var classPrivateFieldGet2 = require("./classPrivateFieldGet2.js"); -function _classPrivateFieldSet(e, t, r) { - var s = classPrivateFieldGet2(t, e); - return classApplyDescriptorSet(e, s, r), r; -} -module.exports = _classPrivateFieldSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js b/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js deleted file mode 100644 index 25c60ca..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateFieldSet2(s, a, r) { - return s.set(assertClassBrand(s, a), r), r; -} -module.exports = _classPrivateFieldSet2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateGetter.js b/node_modules/@babel/runtime/helpers/classPrivateGetter.js deleted file mode 100644 index 1b3cf30..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateGetter.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateGetter(s, r, a) { - return a(assertClassBrand(s, r)); -} -module.exports = _classPrivateGetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js deleted file mode 100644 index e4af387..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateMethodGet(s, a, r) { - return assertClassBrand(a, s), r; -} -module.exports = _classPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js b/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js deleted file mode 100644 index 821c8ed..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js"); -function _classPrivateMethodInitSpec(e, a) { - checkPrivateRedeclaration(e, a), a.add(e); -} -module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js deleted file mode 100644 index a44fd78..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classPrivateMethodSet() { - throw new TypeError("attempted to reassign private method"); -} -module.exports = _classPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classPrivateSetter.js b/node_modules/@babel/runtime/helpers/classPrivateSetter.js deleted file mode 100644 index 494f81f..0000000 --- a/node_modules/@babel/runtime/helpers/classPrivateSetter.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classPrivateSetter(s, r, a, t) { - return r(assertClassBrand(s, a), t), t; -} -module.exports = _classPrivateSetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js deleted file mode 100644 index 2bb6e8b..0000000 --- a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldDestructureSet(t, r, s) { - return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s); -} -module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js deleted file mode 100644 index eb2365f..0000000 --- a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldSpecGet(t, s, r) { - return assertClassBrand(s, t), classCheckPrivateStaticFieldDescriptor(r, "get"), classApplyDescriptorGet(t, r); -} -module.exports = _classStaticPrivateFieldSpecGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js deleted file mode 100644 index 7783cd8..0000000 --- a/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +++ /dev/null @@ -1,7 +0,0 @@ -var classApplyDescriptorSet = require("./classApplyDescriptorSet.js"); -var assertClassBrand = require("./assertClassBrand.js"); -var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js"); -function _classStaticPrivateFieldSpecSet(s, t, r, e) { - return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e; -} -module.exports = _classStaticPrivateFieldSpecSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js deleted file mode 100644 index c895be5..0000000 --- a/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -var assertClassBrand = require("./assertClassBrand.js"); -function _classStaticPrivateMethodGet(s, a, t) { - return assertClassBrand(a, s), t; -} -module.exports = _classStaticPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js deleted file mode 100644 index 72560e6..0000000 --- a/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classStaticPrivateMethodSet() { - throw new TypeError("attempted to set read only static private field"); -} -module.exports = _classStaticPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/construct.js b/node_modules/@babel/runtime/helpers/construct.js deleted file mode 100644 index aee8e70..0000000 --- a/node_modules/@babel/runtime/helpers/construct.js +++ /dev/null @@ -1,10 +0,0 @@ -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var setPrototypeOf = require("./setPrototypeOf.js"); -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/createClass.js b/node_modules/@babel/runtime/helpers/createClass.js deleted file mode 100644 index 8757f9e..0000000 --- a/node_modules/@babel/runtime/helpers/createClass.js +++ /dev/null @@ -1,13 +0,0 @@ -var toPropertyKey = require("./toPropertyKey.js"); -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js b/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js deleted file mode 100644 index 2778307..0000000 --- a/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +++ /dev/null @@ -1,50 +0,0 @@ -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var _n = 0, - F = function F() {}; - return { - s: F, - n: function n() { - return _n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[_n++] - }; - }, - e: function e(r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function s() { - t = t.call(r); - }, - n: function n() { - var r = t.next(); - return a = r.done, r; - }, - e: function e(r) { - u = !0, o = r; - }, - f: function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - } - }; -} -module.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js b/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js deleted file mode 100644 index bc81b1c..0000000 --- a/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +++ /dev/null @@ -1,19 +0,0 @@ -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: !0 - } : { - done: !1, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _createForOfIteratorHelperLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/createSuper.js b/node_modules/@babel/runtime/helpers/createSuper.js deleted file mode 100644 index b1869e6..0000000 --- a/node_modules/@babel/runtime/helpers/createSuper.js +++ /dev/null @@ -1,16 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); -var possibleConstructorReturn = require("./possibleConstructorReturn.js"); -function _createSuper(t) { - var r = isNativeReflectConstruct(); - return function () { - var e, - o = getPrototypeOf(t); - if (r) { - var s = getPrototypeOf(this).constructor; - e = Reflect.construct(o, arguments, s); - } else e = o.apply(this, arguments); - return possibleConstructorReturn(this, e); - }; -} -module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/decorate.js b/node_modules/@babel/runtime/helpers/decorate.js deleted file mode 100644 index bc22acf..0000000 --- a/node_modules/@babel/runtime/helpers/decorate.js +++ /dev/null @@ -1,250 +0,0 @@ -var toArray = require("./toArray.js"); -var toPropertyKey = require("./toPropertyKey.js"); -function _decorate(e, r, t, i) { - var o = _getDecoratorsApi(); - if (i) for (var n = 0; n < i.length; n++) o = i[n](o); - var s = r(function (e) { - o.initializeInstanceElements(e, a.elements); - }, t), - a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e); - return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers); -} -function _getDecoratorsApi() { - _getDecoratorsApi = function _getDecoratorsApi() { - return e; - }; - var e = { - elementsDefinitionOrder: [["method"], ["field"]], - initializeInstanceElements: function initializeInstanceElements(e, r) { - ["method", "field"].forEach(function (t) { - r.forEach(function (r) { - r.kind === t && "own" === r.placement && this.defineClassElement(e, r); - }, this); - }, this); - }, - initializeClassElements: function initializeClassElements(e, r) { - var t = e.prototype; - ["method", "field"].forEach(function (i) { - r.forEach(function (r) { - var o = r.placement; - if (r.kind === i && ("static" === o || "prototype" === o)) { - var n = "static" === o ? e : t; - this.defineClassElement(n, r); - } - }, this); - }, this); - }, - defineClassElement: function defineClassElement(e, r) { - var t = r.descriptor; - if ("field" === r.kind) { - var i = r.initializer; - t = { - enumerable: t.enumerable, - writable: t.writable, - configurable: t.configurable, - value: void 0 === i ? void 0 : i.call(e) - }; - } - Object.defineProperty(e, r.key, t); - }, - decorateClass: function decorateClass(e, r) { - var t = [], - i = [], - o = { - "static": [], - prototype: [], - own: [] - }; - if (e.forEach(function (e) { - this.addElementPlacement(e, o); - }, this), e.forEach(function (e) { - if (!_hasDecorators(e)) return t.push(e); - var r = this.decorateElement(e, o); - t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers); - }, this), !r) return { - elements: t, - finishers: i - }; - var n = this.decorateConstructor(t, r); - return i.push.apply(i, n.finishers), n.finishers = i, n; - }, - addElementPlacement: function addElementPlacement(e, r, t) { - var i = r[e.placement]; - if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")"); - i.push(e.key); - }, - decorateElement: function decorateElement(e, r) { - for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) { - var s = r[e.placement]; - s.splice(s.indexOf(e.key), 1); - var a = this.fromElementDescriptor(e), - l = this.toElementFinisherExtras((0, o[n])(a) || a); - e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher); - var c = l.extras; - if (c) { - for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r); - t.push.apply(t, c); - } - } - return { - element: e, - finishers: i, - extras: t - }; - }, - decorateConstructor: function decorateConstructor(e, r) { - for (var t = [], i = r.length - 1; i >= 0; i--) { - var o = this.fromClassDescriptor(e), - n = this.toClassDescriptor((0, r[i])(o) || o); - if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) { - e = n.elements; - for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")"); - } - } - return { - elements: e, - finishers: t - }; - }, - fromElementDescriptor: function fromElementDescriptor(e) { - var r = { - kind: e.kind, - key: e.key, - placement: e.placement, - descriptor: e.descriptor - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), "field" === e.kind && (r.initializer = e.initializer), r; - }, - toElementDescriptors: function toElementDescriptors(e) { - if (void 0 !== e) return toArray(e).map(function (e) { - var r = this.toElementDescriptor(e); - return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r; - }, this); - }, - toElementDescriptor: function toElementDescriptor(e) { - var r = e.kind + ""; - if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"'); - var t = toPropertyKey(e.key), - i = e.placement + ""; - if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"'); - var o = e.descriptor; - this.disallowProperty(e, "elements", "An element descriptor"); - var n = { - kind: r, - key: t, - placement: i, - descriptor: Object.assign({}, o) - }; - return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n; - }, - toElementFinisherExtras: function toElementFinisherExtras(e) { - return { - element: this.toElementDescriptor(e), - finisher: _optionalCallableProperty(e, "finisher"), - extras: this.toElementDescriptors(e.extras) - }; - }, - fromClassDescriptor: function fromClassDescriptor(e) { - var r = { - kind: "class", - elements: e.map(this.fromElementDescriptor, this) - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), r; - }, - toClassDescriptor: function toClassDescriptor(e) { - var r = e.kind + ""; - if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"'); - this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor"); - var t = _optionalCallableProperty(e, "finisher"); - return { - elements: this.toElementDescriptors(e.elements), - finisher: t - }; - }, - runClassFinishers: function runClassFinishers(e, r) { - for (var t = 0; t < r.length; t++) { - var i = (0, r[t])(e); - if (void 0 !== i) { - if ("function" != typeof i) throw new TypeError("Finishers must return a constructor."); - e = i; - } - } - return e; - }, - disallowProperty: function disallowProperty(e, r, t) { - if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property."); - } - }; - return e; -} -function _createElementDescriptor(e) { - var r, - t = toPropertyKey(e.key); - "method" === e.kind ? r = { - value: e.value, - writable: !0, - configurable: !0, - enumerable: !1 - } : "get" === e.kind ? r = { - get: e.value, - configurable: !0, - enumerable: !1 - } : "set" === e.kind ? r = { - set: e.value, - configurable: !0, - enumerable: !1 - } : "field" === e.kind && (r = { - configurable: !0, - writable: !0, - enumerable: !0 - }); - var i = { - kind: "field" === e.kind ? "field" : "method", - key: t, - placement: e["static"] ? "static" : "field" === e.kind ? "own" : "prototype", - descriptor: r - }; - return e.decorators && (i.decorators = e.decorators), "field" === e.kind && (i.initializer = e.value), i; -} -function _coalesceGetterSetter(e, r) { - void 0 !== e.descriptor.get ? r.descriptor.get = e.descriptor.get : r.descriptor.set = e.descriptor.set; -} -function _coalesceClassElements(e) { - for (var r = [], isSameElement = function isSameElement(e) { - return "method" === e.kind && e.key === o.key && e.placement === o.placement; - }, t = 0; t < e.length; t++) { - var i, - o = e[t]; - if ("method" === o.kind && (i = r.find(isSameElement))) { - if (_isDataDescriptor(o.descriptor) || _isDataDescriptor(i.descriptor)) { - if (_hasDecorators(o) || _hasDecorators(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated."); - i.descriptor = o.descriptor; - } else { - if (_hasDecorators(o)) { - if (_hasDecorators(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ")."); - i.decorators = o.decorators; - } - _coalesceGetterSetter(o, i); - } - } else r.push(o); - } - return r; -} -function _hasDecorators(e) { - return e.decorators && e.decorators.length; -} -function _isDataDescriptor(e) { - return void 0 !== e && !(void 0 === e.value && void 0 === e.writable); -} -function _optionalCallableProperty(e, r) { - var t = e[r]; - if (void 0 !== t && "function" != typeof t) throw new TypeError("Expected '" + r + "' to be a function"); - return t; -} -module.exports = _decorate, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/defaults.js b/node_modules/@babel/runtime/helpers/defaults.js deleted file mode 100644 index dfdbbb0..0000000 --- a/node_modules/@babel/runtime/helpers/defaults.js +++ /dev/null @@ -1,9 +0,0 @@ -function _defaults(e, r) { - for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) { - var n = t[o], - a = Object.getOwnPropertyDescriptor(r, n); - a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a); - } - return e; -} -module.exports = _defaults, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/defineAccessor.js b/node_modules/@babel/runtime/helpers/defineAccessor.js deleted file mode 100644 index dc065f0..0000000 --- a/node_modules/@babel/runtime/helpers/defineAccessor.js +++ /dev/null @@ -1,8 +0,0 @@ -function _defineAccessor(e, r, n, t) { - var c = { - configurable: !0, - enumerable: !0 - }; - return c[e] = t, Object.defineProperty(r, n, c); -} -module.exports = _defineAccessor, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js b/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js deleted file mode 100644 index ab9f43c..0000000 --- a/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +++ /dev/null @@ -1,12 +0,0 @@ -function _defineEnumerableProperties(e, r) { - for (var t in r) { - var n = r[t]; - n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n); - } - if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) { - var i = a[b]; - (n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n); - } - return e; -} -module.exports = _defineEnumerableProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/defineProperty.js b/node_modules/@babel/runtime/helpers/defineProperty.js deleted file mode 100644 index 2c2ff1e..0000000 --- a/node_modules/@babel/runtime/helpers/defineProperty.js +++ /dev/null @@ -1,10 +0,0 @@ -var toPropertyKey = require("./toPropertyKey.js"); -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/dispose.js b/node_modules/@babel/runtime/helpers/dispose.js deleted file mode 100644 index c20193c..0000000 --- a/node_modules/@babel/runtime/helpers/dispose.js +++ /dev/null @@ -1,28 +0,0 @@ -function dispose_SuppressedError(r, e) { - return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { - this.suppressed = e, this.error = r, this.stack = Error().stack; - }, dispose_SuppressedError.prototype = Object.create(Error.prototype, { - constructor: { - value: dispose_SuppressedError, - writable: !0, - configurable: !0 - } - })), new dispose_SuppressedError(r, e); -} -function _dispose(r, e, s) { - function next() { - for (; r.length > 0;) try { - var o = r.pop(), - p = o.d.call(o.v); - if (o.a) return Promise.resolve(p).then(next, err); - } catch (r) { - return err(r); - } - if (s) throw e; - } - function err(r) { - return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next(); - } - return next(); -} -module.exports = _dispose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/AwaitValue.js b/node_modules/@babel/runtime/helpers/esm/AwaitValue.js deleted file mode 100644 index 6f210c9..0000000 --- a/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +++ /dev/null @@ -1,4 +0,0 @@ -function _AwaitValue(t) { - this.wrapped = t; -} -export { _AwaitValue as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/OverloadYield.js b/node_modules/@babel/runtime/helpers/esm/OverloadYield.js deleted file mode 100644 index d7753a6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +++ /dev/null @@ -1,4 +0,0 @@ -function _OverloadYield(e, d) { - this.v = e, this.k = d; -} -export { _OverloadYield as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js b/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js deleted file mode 100644 index 0f33483..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +++ /dev/null @@ -1,9 +0,0 @@ -function _applyDecoratedDescriptor(i, e, r, n, l) { - var a = {}; - return Object.keys(n).forEach(function (i) { - a[i] = n[i]; - }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { - return n(i, e, r) || r; - }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; -} -export { _applyDecoratedDescriptor as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs.js b/node_modules/@babel/runtime/helpers/esm/applyDecs.js deleted file mode 100644 index 2b75dfd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs.js +++ /dev/null @@ -1,236 +0,0 @@ -import _typeof from "./typeof.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function old_createMetadataMethodsForProperty(e, t, a, r) { - return { - getMetadata: function getMetadata(o) { - old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); - var i = e[o]; - if (void 0 !== i) if (1 === t) { - var n = i["public"]; - if (void 0 !== n) return n[a]; - } else if (2 === t) { - var l = i["private"]; - if (void 0 !== l) return l.get(a); - } else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; - }, - setMetadata: function setMetadata(o, i) { - old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); - var n = e[o]; - if (void 0 === n && (n = e[o] = {}), 1 === t) { - var l = n["public"]; - void 0 === l && (l = n["public"] = {}), l[a] = i; - } else if (2 === t) { - var s = n.priv; - void 0 === s && (s = n["private"] = new Map()), s.set(a, i); - } else n.constructor = i; - } - }; -} -function old_convertMetadataMapToFinal(e, t) { - var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], - r = Object.getOwnPropertySymbols(t); - if (0 !== r.length) { - for (var o = 0; o < r.length; o++) { - var i = r[o], - n = t[i], - l = a ? a[i] : null, - s = n["public"], - c = l ? l["public"] : null; - s && c && Object.setPrototypeOf(s, c); - var d = n["private"]; - if (d) { - var u = Array.from(d.values()), - f = l ? l["private"] : null; - f && (u = u.concat(f)), n["private"] = u; - } - l && Object.setPrototypeOf(n, l); - } - a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; - } -} -function old_createAddInitializerMethod(e, t) { - return function (a) { - old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); - }; -} -function old_memberDec(e, t, a, r, o, i, n, l, s) { - var c; - switch (i) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var d, - u, - f = { - kind: c, - name: l ? "#" + t : toPropertyKey(t), - isStatic: n, - isPrivate: l - }, - p = { - v: !1 - }; - if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { - d = 2, u = Symbol(t); - var v = {}; - 0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { - return a.value; - } : (1 !== i && 3 !== i || (v.get = function () { - return a.get.call(this); - }), 1 !== i && 4 !== i || (v.set = function (e) { - a.set.call(this, e); - })), f.access = v; - } else d = 1, u = t; - try { - return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); - } finally { - p.v = !0; - } -} -function old_assertNotFinished(e, t) { - if (e.v) throw Error("attempted to call " + t + " after decoration was finished"); -} -function old_assertMetadataKey(e) { - if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); -} -function old_assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); -} -function old_assertValidReturnValue(e, t) { - var a = _typeof(t); - if (1 === e) { - if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); - } else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); -} -function old_getInit(e) { - var t; - return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t; -} -function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { - var c, - d, - u, - f, - p, - v, - y, - h = a[0]; - if (n ? (0 === o || 1 === o ? (c = { - get: a[3], - set: a[4] - }, u = "get") : 3 === o ? (c = { - get: a[3] - }, u = "get") : 4 === o ? (c = { - set: a[3] - }, u = "set") : c = { - value: a[3] - }, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? f = { - get: c.get, - set: c.set - } : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p);else for (var m = h.length - 1; m >= 0; m--) { - var b; - void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { - get: v, - set: y - }) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); - } - if (0 === o || 1 === o) { - if (void 0 === d) d = function d(e, t) { - return t; - };else if ("function" != typeof d) { - var g = d; - d = function d(e, t) { - for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); - return a; - }; - } else { - var _ = d; - d = function d(e, t) { - return _.call(e, t); - }; - } - e.push(d); - } - 0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === o ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, r, c)); -} -function old_applyMemberDecs(e, t, a, r, o) { - for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { - var d = o[c]; - if (Array.isArray(d)) { - var u, - f, - p, - v = d[1], - y = d[2], - h = d.length > 3, - m = v >= 5; - if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { - var b = m ? s : l, - g = b.get(y) || 0; - if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); - !g && v > 2 ? b.set(y, v) : b.set(y, !0); - } - old_applyMemberDec(e, u, d, y, v, m, h, f, p); - } - } - old_pushInitializers(e, i), old_pushInitializers(e, n); -} -function old_pushInitializers(e, t) { - t && e.push(function (e) { - for (var a = 0; a < t.length; a++) t[a].call(e); - return e; - }); -} -function old_applyClassDecs(e, t, a, r) { - if (r.length > 0) { - for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { - var s = { - v: !1 - }; - try { - var c = Object.assign({ - kind: "class", - name: n, - addInitializer: old_createAddInitializerMethod(o, s) - }, old_createMetadataMethodsForProperty(a, 0, n, s)), - d = r[l](i, c); - } finally { - s.v = !0; - } - void 0 !== d && (old_assertValidReturnValue(10, d), i = d); - } - e.push(i, function () { - for (var e = 0; e < o.length; e++) o[e].call(i); - }); - } -} -function applyDecs(e, t, a) { - var r = [], - o = {}, - i = {}; - return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; -} -export { applyDecs as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js b/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js deleted file mode 100644 index 8a9d7c5..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +++ /dev/null @@ -1,184 +0,0 @@ -import _typeof from "./typeof.js"; -function applyDecs2203Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, a, n, i, s, o) { - var c; - switch (n) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: s ? "#" + t : t, - "static": i, - "private": s - }, - p = { - v: !1 - }; - 0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === n ? l = function l() { - return r.value; - } : (1 !== n && 3 !== n || (l = function l() { - return r.get.call(this); - }), 1 !== n && 4 !== n || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(o, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, a, n, i, s, o) { - var c, - l, - u, - f, - p, - d, - h = r[0]; - if (s ? c = 0 === n || 1 === n ? { - get: r[3], - set: r[4] - } : 3 === n ? { - get: r[3] - } : 4 === n ? { - set: r[3] - } : { - value: r[3] - } : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { - get: c.get, - set: c.set - } : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f);else for (var v = h.length - 1; v >= 0; v--) { - var g; - void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { - get: p, - set: d - }) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); - } - if (0 === n || 1 === n) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var y = l; - l = function l(e, t) { - for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); - return r; - }; - } else { - var m = l; - l = function l(e, t) { - return m.call(e, t); - }; - } - e.push(l); - } - 0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { - return u.get.call(e, t); - }), e.push(function (e, t) { - return u.set.call(e, t); - })) : 2 === n ? e.push(u) : e.push(function (e, t) { - return u.call(e, t); - }) : Object.defineProperty(t, a, c)); - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - var a = []; - return function (e, t, r) { - for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { - var c = r[o]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { - var v = h ? s : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(e, l, c, p, f, h, d, u); - } - } - pushInitializers(e, a), pushInitializers(e, n); - }(a, e, t), function (e, t, r) { - if (r.length > 0) { - for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { - var o = { - v: !1 - }; - try { - var c = r[s](n, { - kind: "class", - name: i, - addInitializer: createAddInitializerMethod(a, o) - }); - } finally { - o.v = !0; - } - void 0 !== c && (assertValidReturnValue(10, c), n = c); - } - e.push(n, function () { - for (var e = 0; e < a.length; e++) a[e].call(n); - }); - } - }(a, e, r), a; - }; -} -var applyDecs2203Impl; -function applyDecs2203(e, t, r) { - return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); -} -export { applyDecs2203 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js b/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js deleted file mode 100644 index bccc42e..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +++ /dev/null @@ -1,191 +0,0 @@ -import _typeof from "./typeof.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2203RFactory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function memberDec(e, t, r, n, a, i, o, s) { - var c; - switch (a) { - case 1: - c = "accessor"; - break; - case 2: - c = "method"; - break; - case 3: - c = "getter"; - break; - case 4: - c = "setter"; - break; - default: - c = "field"; - } - var l, - u, - f = { - kind: c, - name: o ? "#" + t : toPropertyKey(t), - "static": i, - "private": o - }, - p = { - v: !1 - }; - 0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { - return this[t]; - }, u = function u(e) { - this[t] = e; - }) : 2 === a ? l = function l() { - return r.value; - } : (1 !== a && 3 !== a || (l = function l() { - return r.get.call(this); - }), 1 !== a && 4 !== a || (u = function u(e) { - r.set.call(this, e); - })), f.access = l && u ? { - get: l, - set: u - } : l ? { - get: l - } : { - set: u - }; - try { - return e(s, f); - } finally { - p.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function applyMemberDec(e, t, r, n, a, i, o, s) { - var c, - l, - u, - f, - p, - d, - h, - v = r[0]; - if (o ? (0 === a || 1 === a ? (c = { - get: r[3], - set: r[4] - }, u = "get") : 3 === a ? (c = { - get: r[3] - }, u = "get") : 4 === a ? (c = { - set: r[3] - }, u = "set") : c = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { - get: c.get, - set: c.set - } : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p);else for (var g = v.length - 1; g >= 0; g--) { - var y; - void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { - get: d, - set: h - }) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var m = l; - l = function l(e, t) { - for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); - return r; - }; - } else { - var b = l; - l = function l(e, t) { - return b.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { - return f.get.call(e, t); - }), e.push(function (e, t) { - return f.set.call(e, t); - })) : 2 === a ? e.push(f) : e.push(function (e, t) { - return f.call(e, t); - }) : Object.defineProperty(t, n, c)); - } - function applyMemberDecs(e, t) { - for (var r, n, a = [], i = new Map(), o = new Map(), s = 0; s < t.length; s++) { - var c = t[s]; - if (Array.isArray(c)) { - var l, - u, - f = c[1], - p = c[2], - d = c.length > 3, - h = f >= 5; - if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { - var v = h ? o : i, - g = v.get(p) || 0; - if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); - !g && f > 2 ? v.set(p, f) : v.set(p, !0); - } - applyMemberDec(a, l, c, p, f, h, d, u); - } - } - return pushInitializers(a, r), pushInitializers(a, n), a; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r) { - return { - e: applyMemberDecs(e, t), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var o = { - v: !1 - }; - try { - var s = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, o) - }); - } finally { - o.v = !0; - } - void 0 !== s && (assertValidReturnValue(10, s), n = s); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2203R(e, t, r) { - return (applyDecs2203R = applyDecs2203RFactory())(e, t, r); -} -export { applyDecs2203R as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js b/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js deleted file mode 100644 index 8d110f7..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +++ /dev/null @@ -1,222 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2301Factory() { - function createAddInitializerMethod(e, t) { - return function (r) { - !function (e) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - }(t), assertCallable(r, "An initializer"), e.push(r); - }; - } - function assertInstanceIfPrivate(e, t) { - if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); - } - function memberDec(e, t, r, n, a, i, s, o, c) { - var u; - switch (a) { - case 1: - u = "accessor"; - break; - case 2: - u = "method"; - break; - case 3: - u = "getter"; - break; - case 4: - u = "setter"; - break; - default: - u = "field"; - } - var l, - f, - p = { - kind: u, - name: s ? "#" + t : toPropertyKey(t), - "static": i, - "private": s - }, - d = { - v: !1 - }; - if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { - if (2 === a) l = function l(e) { - return assertInstanceIfPrivate(c, e), r.value; - };else { - var h = 0 === a || 1 === a; - (h || 3 === a) && (l = s ? function (e) { - return assertInstanceIfPrivate(c, e), r.get.call(e); - } : function (e) { - return r.get.call(e); - }), (h || 4 === a) && (f = s ? function (e, t) { - assertInstanceIfPrivate(c, e), r.set.call(e, t); - } : function (e, t) { - r.set.call(e, t); - }); - } - } else l = function l(e) { - return e[t]; - }, 0 === a && (f = function f(e, r) { - e[t] = r; - }); - var v = s ? c.bind() : function (e) { - return t in e; - }; - p.access = l && f ? { - get: l, - set: f, - has: v - } : l ? { - get: l, - has: v - } : { - set: f, - has: v - }; - try { - return e(o, p); - } finally { - d.v = !0; - } - } - function assertCallable(e, t) { - if ("function" != typeof e) throw new TypeError(t + " must be a function"); - } - function assertValidReturnValue(e, t) { - var r = _typeof(t); - if (1 === e) { - if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); - } else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); - } - function curryThis2(e) { - return function (t) { - e(this, t); - }; - } - function applyMemberDec(e, t, r, n, a, i, s, o, c) { - var u, - l, - f, - p, - d, - h, - v, - y, - g = r[0]; - if (s ? (0 === a || 1 === a ? (u = { - get: (d = r[3], function () { - return d(this); - }), - set: curryThis2(r[4]) - }, f = "get") : 3 === a ? (u = { - get: r[3] - }, f = "get") : 4 === a ? (u = { - set: r[3] - }, f = "set") : u = { - value: r[3] - }, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = { - get: u.get, - set: u.set - } : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h);else for (var m = g.length - 1; m >= 0; m--) { - var b; - void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { - get: v, - set: y - }) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); - } - if (0 === a || 1 === a) { - if (void 0 === l) l = function l(e, t) { - return t; - };else if ("function" != typeof l) { - var I = l; - l = function l(e, t) { - for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); - return r; - }; - } else { - var w = l; - l = function l(e, t) { - return w.call(e, t); - }; - } - e.push(l); - } - 0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { - return p.get.call(e, t); - }), e.push(function (e, t) { - return p.set.call(e, t); - })) : 2 === a ? e.push(p) : e.push(function (e, t) { - return p.call(e, t); - }) : Object.defineProperty(t, n, u)); - } - function applyMemberDecs(e, t, r) { - for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { - var l = t[u]; - if (Array.isArray(l)) { - var f, - p, - d = l[1], - h = l[2], - v = l.length > 3, - y = d >= 5, - g = r; - if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { - return checkInRHS(t) === e; - }), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { - var m = y ? c : o, - b = m.get(h) || 0; - if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - !b && d > 2 ? m.set(h, d) : m.set(h, !0); - } - applyMemberDec(s, f, l, h, d, y, v, p, g); - } - } - return pushInitializers(s, n), pushInitializers(s, a), s; - } - function pushInitializers(e, t) { - t && e.push(function (e) { - for (var r = 0; r < t.length; r++) t[r].call(e); - return e; - }); - } - return function (e, t, r, n) { - return { - e: applyMemberDecs(e, t, n), - get c() { - return function (e, t) { - if (t.length > 0) { - for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { - var s = { - v: !1 - }; - try { - var o = t[i](n, { - kind: "class", - name: a, - addInitializer: createAddInitializerMethod(r, s) - }); - } finally { - s.v = !0; - } - void 0 !== o && (assertValidReturnValue(10, o), n = o); - } - return [n, function () { - for (var e = 0; e < r.length; e++) r[e].call(n); - }]; - } - }(e, r); - } - }; - }; -} -function applyDecs2301(e, t, r, n) { - return (applyDecs2301 = applyDecs2301Factory())(e, t, r, n); -} -export { applyDecs2301 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js b/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js deleted file mode 100644 index a11b2b9..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +++ /dev/null @@ -1,133 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2305(e, t, r, n, o, a) { - function i(e, t, r) { - return function (n, o) { - return r && r(n), e[t].call(n, o); - }; - } - function c(e, t) { - for (var r = 0; r < e.length; r++) e[r].call(t); - return t; - } - function s(e, t, r, n) { - if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); - return e; - } - function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { - function m(e) { - if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var y, - v = t[0], - g = t[3], - b = !u; - if (!b) { - r || Array.isArray(v) || (v = [v]); - var w = {}, - S = [], - A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; - f ? (p || d ? w = { - get: setFunctionName(function () { - return g(this); - }, n, "get"), - set: function set(e) { - t[4](this, e); - } - } : w[A] = g, p || setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); - } - for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { - var D = v[j], - E = r ? v[j - 1] : void 0, - I = {}, - O = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: n, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); - s(t, "An initializer", "be", !0), c.push(t); - }.bind(null, I) - }; - try { - if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { - var k, F; - O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { - return m(e), w.value; - } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { - return e[n]; - }, (o < 2 || 4 === o) && (F = function F(e, t) { - e[n] = t; - })); - var N = O.access = { - has: f ? h.bind() : function (e) { - return n in e; - } - }; - if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { - get: w.get, - set: w.set - } : w[A], O), d) { - if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); - } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); - } - } finally { - I.v = !0; - } - } - return (p || d) && u.push(function (e, t) { - for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); - return t; - }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; - } - function u(e, t) { - return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { - configurable: !0, - enumerable: !0, - value: t - }); - } - if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; - var f = Object.create(null == l ? null : l), - p = function (e, t, r, n) { - var o, - a, - i = [], - s = function s(t) { - return checkInRHS(t) === e; - }, - u = new Map(); - function l(e) { - e && i.push(c.bind(null, e)); - } - for (var f = 0; f < t.length; f++) { - var p = t[f]; - if (Array.isArray(p)) { - var d = p[1], - h = p[2], - m = p.length > 3, - y = 16 & d, - v = !!(8 & d), - g = 0 == (d &= 7), - b = h + "/" + v; - if (!g && !m) { - var w = u.get(b); - if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); - u.set(b, !(d > 2) || d); - } - applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); - } - } - return l(o), l(a), i; - }(e, t, o, f); - return r.length || u(e, f), { - e: p, - get c() { - var t = []; - return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; - } - }; -} -export { applyDecs2305 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js b/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js deleted file mode 100644 index ab8c0fd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +++ /dev/null @@ -1,124 +0,0 @@ -import _typeof from "./typeof.js"; -import checkInRHS from "./checkInRHS.js"; -import setFunctionName from "./setFunctionName.js"; -import toPropertyKey from "./toPropertyKey.js"; -function applyDecs2311(e, t, n, r, o, i) { - var a, - c, - u, - s, - f, - l, - p, - d = Symbol.metadata || Symbol["for"]("Symbol.metadata"), - m = Object.defineProperty, - h = Object.create, - y = [h(null), h(null)], - v = t.length; - function g(t, n, r) { - return function (o, i) { - n && (i = o, o = e); - for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); - return r ? i : o; - }; - } - function b(e, t, n, r) { - if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); - return e; - } - function applyDec(e, t, n, r, o, i, u, s, f, l, p) { - function d(e) { - if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); - } - var h = [].concat(t[0]), - v = t[3], - w = !u, - D = 1 === o, - S = 3 === o, - j = 4 === o, - E = 2 === o; - function I(t, n, r) { - return function (o, i) { - return n && (i = o, o = e), r && r(o), P[t].call(o, i); - }; - } - if (!w) { - var P = {}, - k = [], - F = S ? "get" : j || D ? "set" : "value"; - if (f ? (l || D ? P = { - get: setFunctionName(function () { - return v(this); - }, r, "get"), - set: function set(e) { - t[4](this, e); - } - } : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { - if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); - y[+s][r] = o < 3 ? 1 : o; - } - } - for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { - var T = b(h[O], "A decorator", "be", !0), - z = n ? h[O - 1] : void 0, - A = {}, - H = { - kind: ["field", "accessor", "method", "getter", "setter", "class"][o], - name: r, - metadata: a, - addInitializer: function (e, t) { - if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); - b(t, "An initializer", "be", !0), i.push(t); - }.bind(null, A) - }; - if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = { - has: f ? p.bind() : function (e) { - return r in e; - } - }, j || (c.get = f ? E ? function (e) { - return d(e), P.value; - } : I("get", 0, d) : function (e) { - return e[r]; - }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { - e[r] = t; - }), N = T.call(z, D ? { - get: P.get, - set: P.set - } : P[F], H), A.v = 1, D) { - if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); - } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); - } - return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; - } - function w(e) { - return m(e, d, { - configurable: !0, - enumerable: !0, - value: a - }); - } - return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) { - e && f.push(g(e)); - }, p = function p(t, r) { - for (var i = 0; i < n.length; i++) { - var a = n[i], - c = a[1], - l = 7 & c; - if ((8 & c) == t && !l == r) { - var p = a[2], - d = !!a[3], - m = 16 & c; - applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { - return checkInRHS(t) === e; - } : o); - } - } - }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { - e: c, - get c() { - var n = []; - return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; - } - }; -} -export { applyDecs2311 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js b/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js deleted file mode 100644 index 9ace772..0000000 --- a/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +++ /dev/null @@ -1,6 +0,0 @@ -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -export { _arrayLikeToArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js b/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js deleted file mode 100644 index 99fa715..0000000 --- a/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +++ /dev/null @@ -1,4 +0,0 @@ -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -export { _arrayWithHoles as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js b/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js deleted file mode 100644 index 1ce6f21..0000000 --- a/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +++ /dev/null @@ -1,5 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return arrayLikeToArray(r); -} -export { _arrayWithoutHoles as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js b/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js deleted file mode 100644 index ae7b712..0000000 --- a/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertClassBrand(e, t, n) { - if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; - throw new TypeError("Private element is not present on this object"); -} -export { _assertClassBrand as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js b/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js deleted file mode 100644 index 4a41bde..0000000 --- a/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +++ /dev/null @@ -1,5 +0,0 @@ -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -export { _assertThisInitialized as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js b/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js deleted file mode 100644 index e026689..0000000 --- a/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +++ /dev/null @@ -1,24 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _asyncGeneratorDelegate(t) { - var e = {}, - n = !1; - function pump(e, r) { - return n = !0, r = new Promise(function (n) { - n(t[e](r)); - }), { - done: !1, - value: new OverloadYield(r, 1) - }; - } - return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { - return this; - }, e.next = function (t) { - return n ? (n = !1, t) : pump("next", t); - }, "function" == typeof t["throw"] && (e["throw"] = function (t) { - if (n) throw n = !1, t; - return pump("throw", t); - }), "function" == typeof t["return"] && (e["return"] = function (t) { - return n ? (n = !1, t) : pump("return", t); - }), e; -} -export { _asyncGeneratorDelegate as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/asyncIterator.js b/node_modules/@babel/runtime/helpers/esm/asyncIterator.js deleted file mode 100644 index 2ed00b7..0000000 --- a/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +++ /dev/null @@ -1,45 +0,0 @@ -function _asyncIterator(r) { - var n, - t, - o, - e = 2; - for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { - if (t && null != (n = r[t])) return n.call(r); - if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); - t = "@@asyncIterator", o = "@@iterator"; - } - throw new TypeError("Object is not async iterable"); -} -function AsyncFromSyncIterator(r) { - function AsyncFromSyncIteratorContinuation(r) { - if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); - var n = r.done; - return Promise.resolve(r.value).then(function (r) { - return { - value: r, - done: n - }; - }); - } - return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { - this.s = r, this.n = r.next; - }, AsyncFromSyncIterator.prototype = { - s: null, - n: null, - next: function next() { - return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); - }, - "return": function _return(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.resolve({ - value: r, - done: !0 - }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - }, - "throw": function _throw(r) { - var n = this.s["return"]; - return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); - } - }, new AsyncFromSyncIterator(r); -} -export { _asyncIterator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js b/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js deleted file mode 100644 index 00f29b1..0000000 --- a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +++ /dev/null @@ -1,26 +0,0 @@ -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -export { _asyncToGenerator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js b/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js deleted file mode 100644 index 097c88c..0000000 --- a/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +++ /dev/null @@ -1,5 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _awaitAsyncGenerator(e) { - return new OverloadYield(e, 0); -} -export { _awaitAsyncGenerator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/callSuper.js b/node_modules/@babel/runtime/helpers/esm/callSuper.js deleted file mode 100644 index 6d17a4e..0000000 --- a/node_modules/@babel/runtime/helpers/esm/callSuper.js +++ /dev/null @@ -1,7 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import possibleConstructorReturn from "./possibleConstructorReturn.js"; -function _callSuper(t, o, e) { - return o = getPrototypeOf(o), possibleConstructorReturn(t, isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf(t).constructor) : o.apply(t, e)); -} -export { _callSuper as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/checkInRHS.js b/node_modules/@babel/runtime/helpers/esm/checkInRHS.js deleted file mode 100644 index 12f59b4..0000000 --- a/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +++ /dev/null @@ -1,6 +0,0 @@ -import _typeof from "./typeof.js"; -function _checkInRHS(e) { - if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); - return e; -} -export { _checkInRHS as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js b/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js deleted file mode 100644 index e9e6b3b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +++ /dev/null @@ -1,4 +0,0 @@ -function _checkPrivateRedeclaration(e, t) { - if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); -} -export { _checkPrivateRedeclaration as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js b/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js deleted file mode 100644 index 5623419..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +++ /dev/null @@ -1,10 +0,0 @@ -function _classApplyDescriptorDestructureSet(e, t) { - if (t.set) return "__destrObj" in t || (t.__destrObj = { - set value(r) { - t.set.call(e, r); - } - }), t.__destrObj; - if (!t.writable) throw new TypeError("attempted to set read only private field"); - return t; -} -export { _classApplyDescriptorDestructureSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js b/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js deleted file mode 100644 index b9259d3..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classApplyDescriptorGet(e, t) { - return t.get ? t.get.call(e) : t.value; -} -export { _classApplyDescriptorGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js b/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js deleted file mode 100644 index d9c4fbd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +++ /dev/null @@ -1,7 +0,0 @@ -function _classApplyDescriptorSet(e, t, l) { - if (t.set) t.set.call(e, l);else { - if (!t.writable) throw new TypeError("attempted to set read only private field"); - t.value = l; - } -} -export { _classApplyDescriptorSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classCallCheck.js b/node_modules/@babel/runtime/helpers/esm/classCallCheck.js deleted file mode 100644 index bf97219..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -export { _classCallCheck as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js b/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js deleted file mode 100644 index 366ed05..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classCheckPrivateStaticAccess(s, a, r) { - return assertClassBrand(a, s, r); -} -export { _classCheckPrivateStaticAccess as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js b/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js deleted file mode 100644 index 844be91..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classCheckPrivateStaticFieldDescriptor(t, e) { - if (void 0 === t) throw new TypeError("attempted to " + e + " private static field before its declaration"); -} -export { _classCheckPrivateStaticFieldDescriptor as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js b/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js deleted file mode 100644 index 652689d..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +++ /dev/null @@ -1,5 +0,0 @@ -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classExtractFieldDescriptor(e, t) { - return classPrivateFieldGet2(t, e); -} -export { _classExtractFieldDescriptor as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js b/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js deleted file mode 100644 index 68e76ff..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classNameTDZError(e) { - throw new ReferenceError('Class "' + e + '" cannot be referenced in computed property keys.'); -} -export { _classNameTDZError as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js deleted file mode 100644 index 9303366..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldDestructureSet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorDestructureSet(e, r); -} -export { _classPrivateFieldDestructureSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js deleted file mode 100644 index ce7ebcb..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldGet(e, t) { - var r = classPrivateFieldGet2(t, e); - return classApplyDescriptorGet(e, r); -} -export { _classPrivateFieldGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js deleted file mode 100644 index 4aa3da6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateFieldGet2(s, a) { - return s.get(assertClassBrand(s, a)); -} -export { _classPrivateFieldGet2 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js deleted file mode 100644 index 5dcdbe0..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -import checkPrivateRedeclaration from "./checkPrivateRedeclaration.js"; -function _classPrivateFieldInitSpec(e, t, a) { - checkPrivateRedeclaration(e, t), t.set(e, a); -} -export { _classPrivateFieldInitSpec as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js deleted file mode 100644 index 4bd662c..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +++ /dev/null @@ -1,5 +0,0 @@ -function _classPrivateFieldBase(e, t) { - if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); - return e; -} -export { _classPrivateFieldBase as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js deleted file mode 100644 index 90d2193..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +++ /dev/null @@ -1,5 +0,0 @@ -var id = 0; -function _classPrivateFieldKey(e) { - return "__private_" + id++ + "_" + e; -} -export { _classPrivateFieldKey as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js deleted file mode 100644 index b5161bd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; -import classPrivateFieldGet2 from "./classPrivateFieldGet2.js"; -function _classPrivateFieldSet(e, t, r) { - var s = classPrivateFieldGet2(t, e); - return classApplyDescriptorSet(e, s, r), r; -} -export { _classPrivateFieldSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js b/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js deleted file mode 100644 index 337b01a..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateFieldSet2(s, a, r) { - return s.set(assertClassBrand(s, a), r), r; -} -export { _classPrivateFieldSet2 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js b/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js deleted file mode 100644 index ff3e985..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateGetter(s, r, a) { - return a(assertClassBrand(s, r)); -} -export { _classPrivateGetter as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js deleted file mode 100644 index 4832fc6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateMethodGet(s, a, r) { - return assertClassBrand(a, s), r; -} -export { _classPrivateMethodGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js deleted file mode 100644 index 61e23e2..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +++ /dev/null @@ -1,5 +0,0 @@ -import checkPrivateRedeclaration from "./checkPrivateRedeclaration.js"; -function _classPrivateMethodInitSpec(e, a) { - checkPrivateRedeclaration(e, a), a.add(e); -} -export { _classPrivateMethodInitSpec as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js deleted file mode 100644 index d181b51..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classPrivateMethodSet() { - throw new TypeError("attempted to reassign private method"); -} -export { _classPrivateMethodSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js b/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js deleted file mode 100644 index 9a80d59..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classPrivateSetter(s, r, a, t) { - return r(assertClassBrand(s, a), t), t; -} -export { _classPrivateSetter as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js deleted file mode 100644 index 747e639..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorDestructureSet from "./classApplyDescriptorDestructureSet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldDestructureSet(t, r, s) { - return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s); -} -export { _classStaticPrivateFieldDestructureSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js deleted file mode 100644 index 23684b7..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorGet from "./classApplyDescriptorGet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldSpecGet(t, s, r) { - return assertClassBrand(s, t), classCheckPrivateStaticFieldDescriptor(r, "get"), classApplyDescriptorGet(t, r); -} -export { _classStaticPrivateFieldSpecGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js deleted file mode 100644 index 3a31468..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +++ /dev/null @@ -1,7 +0,0 @@ -import classApplyDescriptorSet from "./classApplyDescriptorSet.js"; -import assertClassBrand from "./assertClassBrand.js"; -import classCheckPrivateStaticFieldDescriptor from "./classCheckPrivateStaticFieldDescriptor.js"; -function _classStaticPrivateFieldSpecSet(s, t, r, e) { - return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e; -} -export { _classStaticPrivateFieldSpecSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js deleted file mode 100644 index 047b177..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +++ /dev/null @@ -1,5 +0,0 @@ -import assertClassBrand from "./assertClassBrand.js"; -function _classStaticPrivateMethodGet(s, a, t) { - return assertClassBrand(a, s), t; -} -export { _classStaticPrivateMethodGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js b/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js deleted file mode 100644 index a61ae63..0000000 --- a/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +++ /dev/null @@ -1,4 +0,0 @@ -function _classStaticPrivateMethodSet() { - throw new TypeError("attempted to set read only static private field"); -} -export { _classStaticPrivateMethodSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/construct.js b/node_modules/@babel/runtime/helpers/esm/construct.js deleted file mode 100644 index 91609ff..0000000 --- a/node_modules/@babel/runtime/helpers/esm/construct.js +++ /dev/null @@ -1,10 +0,0 @@ -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -export { _construct as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/createClass.js b/node_modules/@babel/runtime/helpers/esm/createClass.js deleted file mode 100644 index 9b17851..0000000 --- a/node_modules/@babel/runtime/helpers/esm/createClass.js +++ /dev/null @@ -1,13 +0,0 @@ -import toPropertyKey from "./toPropertyKey.js"; -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; -} -export { _createClass as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js b/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js deleted file mode 100644 index 93b97f9..0000000 --- a/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +++ /dev/null @@ -1,50 +0,0 @@ -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var _n = 0, - F = function F() {}; - return { - s: F, - n: function n() { - return _n >= r.length ? { - done: !0 - } : { - done: !1, - value: r[_n++] - }; - }, - e: function e(r) { - throw r; - }, - f: F - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, - a = !0, - u = !1; - return { - s: function s() { - t = t.call(r); - }, - n: function n() { - var r = t.next(); - return a = r.done, r; - }, - e: function e(r) { - u = !0, o = r; - }, - f: function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - } - }; -} -export { _createForOfIteratorHelper as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js b/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js deleted file mode 100644 index 3deaae4..0000000 --- a/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +++ /dev/null @@ -1,19 +0,0 @@ -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: !0 - } : { - done: !1, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _createForOfIteratorHelperLoose as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/createSuper.js b/node_modules/@babel/runtime/helpers/esm/createSuper.js deleted file mode 100644 index dfabf71..0000000 --- a/node_modules/@babel/runtime/helpers/esm/createSuper.js +++ /dev/null @@ -1,16 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import isNativeReflectConstruct from "./isNativeReflectConstruct.js"; -import possibleConstructorReturn from "./possibleConstructorReturn.js"; -function _createSuper(t) { - var r = isNativeReflectConstruct(); - return function () { - var e, - o = getPrototypeOf(t); - if (r) { - var s = getPrototypeOf(this).constructor; - e = Reflect.construct(o, arguments, s); - } else e = o.apply(this, arguments); - return possibleConstructorReturn(this, e); - }; -} -export { _createSuper as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/decorate.js b/node_modules/@babel/runtime/helpers/esm/decorate.js deleted file mode 100644 index f76b6a6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/decorate.js +++ /dev/null @@ -1,250 +0,0 @@ -import toArray from "./toArray.js"; -import toPropertyKey from "./toPropertyKey.js"; -function _decorate(e, r, t, i) { - var o = _getDecoratorsApi(); - if (i) for (var n = 0; n < i.length; n++) o = i[n](o); - var s = r(function (e) { - o.initializeInstanceElements(e, a.elements); - }, t), - a = o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)), e); - return o.initializeClassElements(s.F, a.elements), o.runClassFinishers(s.F, a.finishers); -} -function _getDecoratorsApi() { - _getDecoratorsApi = function _getDecoratorsApi() { - return e; - }; - var e = { - elementsDefinitionOrder: [["method"], ["field"]], - initializeInstanceElements: function initializeInstanceElements(e, r) { - ["method", "field"].forEach(function (t) { - r.forEach(function (r) { - r.kind === t && "own" === r.placement && this.defineClassElement(e, r); - }, this); - }, this); - }, - initializeClassElements: function initializeClassElements(e, r) { - var t = e.prototype; - ["method", "field"].forEach(function (i) { - r.forEach(function (r) { - var o = r.placement; - if (r.kind === i && ("static" === o || "prototype" === o)) { - var n = "static" === o ? e : t; - this.defineClassElement(n, r); - } - }, this); - }, this); - }, - defineClassElement: function defineClassElement(e, r) { - var t = r.descriptor; - if ("field" === r.kind) { - var i = r.initializer; - t = { - enumerable: t.enumerable, - writable: t.writable, - configurable: t.configurable, - value: void 0 === i ? void 0 : i.call(e) - }; - } - Object.defineProperty(e, r.key, t); - }, - decorateClass: function decorateClass(e, r) { - var t = [], - i = [], - o = { - "static": [], - prototype: [], - own: [] - }; - if (e.forEach(function (e) { - this.addElementPlacement(e, o); - }, this), e.forEach(function (e) { - if (!_hasDecorators(e)) return t.push(e); - var r = this.decorateElement(e, o); - t.push(r.element), t.push.apply(t, r.extras), i.push.apply(i, r.finishers); - }, this), !r) return { - elements: t, - finishers: i - }; - var n = this.decorateConstructor(t, r); - return i.push.apply(i, n.finishers), n.finishers = i, n; - }, - addElementPlacement: function addElementPlacement(e, r, t) { - var i = r[e.placement]; - if (!t && -1 !== i.indexOf(e.key)) throw new TypeError("Duplicated element (" + e.key + ")"); - i.push(e.key); - }, - decorateElement: function decorateElement(e, r) { - for (var t = [], i = [], o = e.decorators, n = o.length - 1; n >= 0; n--) { - var s = r[e.placement]; - s.splice(s.indexOf(e.key), 1); - var a = this.fromElementDescriptor(e), - l = this.toElementFinisherExtras((0, o[n])(a) || a); - e = l.element, this.addElementPlacement(e, r), l.finisher && i.push(l.finisher); - var c = l.extras; - if (c) { - for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], r); - t.push.apply(t, c); - } - } - return { - element: e, - finishers: i, - extras: t - }; - }, - decorateConstructor: function decorateConstructor(e, r) { - for (var t = [], i = r.length - 1; i >= 0; i--) { - var o = this.fromClassDescriptor(e), - n = this.toClassDescriptor((0, r[i])(o) || o); - if (void 0 !== n.finisher && t.push(n.finisher), void 0 !== n.elements) { - e = n.elements; - for (var s = 0; s < e.length - 1; s++) for (var a = s + 1; a < e.length; a++) if (e[s].key === e[a].key && e[s].placement === e[a].placement) throw new TypeError("Duplicated element (" + e[s].key + ")"); - } - } - return { - elements: e, - finishers: t - }; - }, - fromElementDescriptor: function fromElementDescriptor(e) { - var r = { - kind: e.kind, - key: e.key, - placement: e.placement, - descriptor: e.descriptor - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), "field" === e.kind && (r.initializer = e.initializer), r; - }, - toElementDescriptors: function toElementDescriptors(e) { - if (void 0 !== e) return toArray(e).map(function (e) { - var r = this.toElementDescriptor(e); - return this.disallowProperty(e, "finisher", "An element descriptor"), this.disallowProperty(e, "extras", "An element descriptor"), r; - }, this); - }, - toElementDescriptor: function toElementDescriptor(e) { - var r = e.kind + ""; - if ("method" !== r && "field" !== r) throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "' + r + '"'); - var t = toPropertyKey(e.key), - i = e.placement + ""; - if ("static" !== i && "prototype" !== i && "own" !== i) throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "' + i + '"'); - var o = e.descriptor; - this.disallowProperty(e, "elements", "An element descriptor"); - var n = { - kind: r, - key: t, - placement: i, - descriptor: Object.assign({}, o) - }; - return "field" !== r ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), n.initializer = e.initializer), n; - }, - toElementFinisherExtras: function toElementFinisherExtras(e) { - return { - element: this.toElementDescriptor(e), - finisher: _optionalCallableProperty(e, "finisher"), - extras: this.toElementDescriptors(e.extras) - }; - }, - fromClassDescriptor: function fromClassDescriptor(e) { - var r = { - kind: "class", - elements: e.map(this.fromElementDescriptor, this) - }; - return Object.defineProperty(r, Symbol.toStringTag, { - value: "Descriptor", - configurable: !0 - }), r; - }, - toClassDescriptor: function toClassDescriptor(e) { - var r = e.kind + ""; - if ("class" !== r) throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "' + r + '"'); - this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor"); - var t = _optionalCallableProperty(e, "finisher"); - return { - elements: this.toElementDescriptors(e.elements), - finisher: t - }; - }, - runClassFinishers: function runClassFinishers(e, r) { - for (var t = 0; t < r.length; t++) { - var i = (0, r[t])(e); - if (void 0 !== i) { - if ("function" != typeof i) throw new TypeError("Finishers must return a constructor."); - e = i; - } - } - return e; - }, - disallowProperty: function disallowProperty(e, r, t) { - if (void 0 !== e[r]) throw new TypeError(t + " can't have a ." + r + " property."); - } - }; - return e; -} -function _createElementDescriptor(e) { - var r, - t = toPropertyKey(e.key); - "method" === e.kind ? r = { - value: e.value, - writable: !0, - configurable: !0, - enumerable: !1 - } : "get" === e.kind ? r = { - get: e.value, - configurable: !0, - enumerable: !1 - } : "set" === e.kind ? r = { - set: e.value, - configurable: !0, - enumerable: !1 - } : "field" === e.kind && (r = { - configurable: !0, - writable: !0, - enumerable: !0 - }); - var i = { - kind: "field" === e.kind ? "field" : "method", - key: t, - placement: e["static"] ? "static" : "field" === e.kind ? "own" : "prototype", - descriptor: r - }; - return e.decorators && (i.decorators = e.decorators), "field" === e.kind && (i.initializer = e.value), i; -} -function _coalesceGetterSetter(e, r) { - void 0 !== e.descriptor.get ? r.descriptor.get = e.descriptor.get : r.descriptor.set = e.descriptor.set; -} -function _coalesceClassElements(e) { - for (var r = [], isSameElement = function isSameElement(e) { - return "method" === e.kind && e.key === o.key && e.placement === o.placement; - }, t = 0; t < e.length; t++) { - var i, - o = e[t]; - if ("method" === o.kind && (i = r.find(isSameElement))) { - if (_isDataDescriptor(o.descriptor) || _isDataDescriptor(i.descriptor)) { - if (_hasDecorators(o) || _hasDecorators(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated."); - i.descriptor = o.descriptor; - } else { - if (_hasDecorators(o)) { - if (_hasDecorators(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ")."); - i.decorators = o.decorators; - } - _coalesceGetterSetter(o, i); - } - } else r.push(o); - } - return r; -} -function _hasDecorators(e) { - return e.decorators && e.decorators.length; -} -function _isDataDescriptor(e) { - return void 0 !== e && !(void 0 === e.value && void 0 === e.writable); -} -function _optionalCallableProperty(e, r) { - var t = e[r]; - if (void 0 !== t && "function" != typeof t) throw new TypeError("Expected '" + r + "' to be a function"); - return t; -} -export { _decorate as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/defaults.js b/node_modules/@babel/runtime/helpers/esm/defaults.js deleted file mode 100644 index d3041a3..0000000 --- a/node_modules/@babel/runtime/helpers/esm/defaults.js +++ /dev/null @@ -1,9 +0,0 @@ -function _defaults(e, r) { - for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) { - var n = t[o], - a = Object.getOwnPropertyDescriptor(r, n); - a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a); - } - return e; -} -export { _defaults as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/defineAccessor.js b/node_modules/@babel/runtime/helpers/esm/defineAccessor.js deleted file mode 100644 index a8292de..0000000 --- a/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +++ /dev/null @@ -1,8 +0,0 @@ -function _defineAccessor(e, r, n, t) { - var c = { - configurable: !0, - enumerable: !0 - }; - return c[e] = t, Object.defineProperty(r, n, c); -} -export { _defineAccessor as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js b/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js deleted file mode 100644 index 3d31d98..0000000 --- a/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +++ /dev/null @@ -1,12 +0,0 @@ -function _defineEnumerableProperties(e, r) { - for (var t in r) { - var n = r[t]; - n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n); - } - if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) { - var i = a[b]; - (n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n); - } - return e; -} -export { _defineEnumerableProperties as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/defineProperty.js b/node_modules/@babel/runtime/helpers/esm/defineProperty.js deleted file mode 100644 index 05ec32b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/defineProperty.js +++ /dev/null @@ -1,10 +0,0 @@ -import toPropertyKey from "./toPropertyKey.js"; -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} -export { _defineProperty as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/dispose.js b/node_modules/@babel/runtime/helpers/esm/dispose.js deleted file mode 100644 index a87ab20..0000000 --- a/node_modules/@babel/runtime/helpers/esm/dispose.js +++ /dev/null @@ -1,28 +0,0 @@ -function dispose_SuppressedError(r, e) { - return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { - this.suppressed = e, this.error = r, this.stack = Error().stack; - }, dispose_SuppressedError.prototype = Object.create(Error.prototype, { - constructor: { - value: dispose_SuppressedError, - writable: !0, - configurable: !0 - } - })), new dispose_SuppressedError(r, e); -} -function _dispose(r, e, s) { - function next() { - for (; r.length > 0;) try { - var o = r.pop(), - p = o.d.call(o.v); - if (o.a) return Promise.resolve(p).then(next, err); - } catch (r) { - return err(r); - } - if (s) throw e; - } - function err(r) { - return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next(); - } - return next(); -} -export { _dispose as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/extends.js b/node_modules/@babel/runtime/helpers/esm/extends.js deleted file mode 100644 index 53f118c..0000000 --- a/node_modules/@babel/runtime/helpers/esm/extends.js +++ /dev/null @@ -1,10 +0,0 @@ -function _extends() { - return _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, _extends.apply(null, arguments); -} -export { _extends as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/get.js b/node_modules/@babel/runtime/helpers/esm/get.js deleted file mode 100644 index 8124bc0..0000000 --- a/node_modules/@babel/runtime/helpers/esm/get.js +++ /dev/null @@ -1,11 +0,0 @@ -import superPropBase from "./superPropBase.js"; -function _get() { - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, _get.apply(null, arguments); -} -export { _get as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js b/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js deleted file mode 100644 index 9073c45..0000000 --- a/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _getPrototypeOf(t) { - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, _getPrototypeOf(t); -} -export { _getPrototypeOf as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/identity.js b/node_modules/@babel/runtime/helpers/esm/identity.js deleted file mode 100644 index 6b564ac..0000000 --- a/node_modules/@babel/runtime/helpers/esm/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -function _identity(t) { - return t; -} -export { _identity as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js b/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js deleted file mode 100644 index 6d35b52..0000000 --- a/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +++ /dev/null @@ -1,27 +0,0 @@ -function _importDeferProxy(e) { - var t = null, - constValue = function constValue(e) { - return function () { - return e; - }; - }, - proxy = function proxy(r) { - return function (n, o, f) { - return null === t && (t = e()), r(t, o, f); - }; - }; - return new Proxy({}, { - defineProperty: constValue(!1), - deleteProperty: constValue(!1), - get: proxy(Reflect.get), - getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor), - getPrototypeOf: constValue(null), - isExtensible: constValue(!1), - has: proxy(Reflect.has), - ownKeys: proxy(Reflect.ownKeys), - preventExtensions: constValue(!0), - set: constValue(!1), - setPrototypeOf: constValue(!1) - }); -} -export { _importDeferProxy as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/inherits.js b/node_modules/@babel/runtime/helpers/esm/inherits.js deleted file mode 100644 index 78f6e4e..0000000 --- a/node_modules/@babel/runtime/helpers/esm/inherits.js +++ /dev/null @@ -1,14 +0,0 @@ -import setPrototypeOf from "./setPrototypeOf.js"; -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -export { _inherits as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js b/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js deleted file mode 100644 index 0bd1330..0000000 --- a/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +++ /dev/null @@ -1,5 +0,0 @@ -import setPrototypeOf from "./setPrototypeOf.js"; -function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o); -} -export { _inheritsLoose as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js b/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js deleted file mode 100644 index 68bcc2c..0000000 --- a/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +++ /dev/null @@ -1,9 +0,0 @@ -function _initializerDefineProperty(e, i, r, l) { - r && Object.defineProperty(e, i, { - enumerable: r.enumerable, - configurable: r.configurable, - writable: r.writable, - value: r.initializer ? r.initializer.call(l) : void 0 - }); -} -export { _initializerDefineProperty as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js b/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js deleted file mode 100644 index 0a658e3..0000000 --- a/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +++ /dev/null @@ -1,4 +0,0 @@ -function _initializerWarningHelper(r, e) { - throw Error("Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform."); -} -export { _initializerWarningHelper as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/instanceof.js b/node_modules/@babel/runtime/helpers/esm/instanceof.js deleted file mode 100644 index 316539e..0000000 --- a/node_modules/@babel/runtime/helpers/esm/instanceof.js +++ /dev/null @@ -1,4 +0,0 @@ -function _instanceof(n, e) { - return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](n) : n instanceof e; -} -export { _instanceof as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js b/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js deleted file mode 100644 index 365d248..0000000 --- a/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +++ /dev/null @@ -1,6 +0,0 @@ -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -export { _interopRequireDefault as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js b/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js deleted file mode 100644 index ed9ca31..0000000 --- a/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +++ /dev/null @@ -1,22 +0,0 @@ -import _typeof from "./typeof.js"; -function _interopRequireWildcard(e, t) { - if ("function" == typeof WeakMap) var r = new WeakMap(), - n = new WeakMap(); - return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { - if (!t && e && e.__esModule) return e; - var o, - i, - f = { - __proto__: null, - "default": e - }; - if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; - if (o = t ? n : r) { - if (o.has(e)) return o.get(e); - o.set(e, f); - } - for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); - return f; - })(e, t); -} -export { _interopRequireWildcard as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js b/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js deleted file mode 100644 index 0cfe276..0000000 --- a/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -export { _isNativeFunction as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js b/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js deleted file mode 100644 index 0eb5e39..0000000 --- a/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +++ /dev/null @@ -1,9 +0,0 @@ -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - })(); -} -export { _isNativeReflectConstruct as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/iterableToArray.js b/node_modules/@babel/runtime/helpers/esm/iterableToArray.js deleted file mode 100644 index b7de339..0000000 --- a/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +++ /dev/null @@ -1,4 +0,0 @@ -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -export { _iterableToArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js b/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js deleted file mode 100644 index 473f067..0000000 --- a/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +++ /dev/null @@ -1,28 +0,0 @@ -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -export { _iterableToArrayLimit as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/jsx.js b/node_modules/@babel/runtime/helpers/esm/jsx.js deleted file mode 100644 index a120e5b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/jsx.js +++ /dev/null @@ -1,22 +0,0 @@ -var REACT_ELEMENT_TYPE; -function _createRawReactElement(e, r, E, l) { - REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); - var o = e && e.defaultProps, - n = arguments.length - 3; - if (r || 0 === n || (r = { - children: void 0 - }), 1 === n) r.children = l;else if (n > 1) { - for (var t = Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; - r.children = t; - } - if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); - return { - $$typeof: REACT_ELEMENT_TYPE, - type: e, - key: void 0 === E ? null : "" + E, - ref: null, - props: r, - _owner: null - }; -} -export { _createRawReactElement as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js b/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js deleted file mode 100644 index 527c682..0000000 --- a/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +++ /dev/null @@ -1,9 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _maybeArrayLike(r, a, e) { - if (a && !Array.isArray(a) && "number" == typeof a.length) { - var y = a.length; - return arrayLikeToArray(a, void 0 !== e && e < y ? e : y); - } - return r(a, e); -} -export { _maybeArrayLike as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js b/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js deleted file mode 100644 index 5f70e0d..0000000 --- a/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _newArrowCheck(n, r) { - if (n !== r) throw new TypeError("Cannot instantiate an arrow function"); -} -export { _newArrowCheck as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js b/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js deleted file mode 100644 index 9050250..0000000 --- a/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _nonIterableRest as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js b/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js deleted file mode 100644 index fb03235..0000000 --- a/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -export { _nonIterableSpread as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js b/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js deleted file mode 100644 index d8c3060..0000000 --- a/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nullishReceiverError(r) { - throw new TypeError("Cannot set property of null or undefined."); -} -export { _nullishReceiverError as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js b/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js deleted file mode 100644 index a92eac8..0000000 --- a/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +++ /dev/null @@ -1,4 +0,0 @@ -function _objectDestructuringEmpty(t) { - if (null == t) throw new TypeError("Cannot destructure " + t); -} -export { _objectDestructuringEmpty as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/objectSpread.js b/node_modules/@babel/runtime/helpers/esm/objectSpread.js deleted file mode 100644 index 0f82f06..0000000 --- a/node_modules/@babel/runtime/helpers/esm/objectSpread.js +++ /dev/null @@ -1,14 +0,0 @@ -import defineProperty from "./defineProperty.js"; -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? Object(arguments[r]) : {}, - o = Object.keys(t); - "function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), o.forEach(function (r) { - defineProperty(e, r, t[r]); - }); - } - return e; -} -export { _objectSpread as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/objectSpread2.js b/node_modules/@babel/runtime/helpers/esm/objectSpread2.js deleted file mode 100644 index 0035bc7..0000000 --- a/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +++ /dev/null @@ -1,23 +0,0 @@ -import defineProperty from "./defineProperty.js"; -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -export { _objectSpread2 as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js b/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js deleted file mode 100644 index 598fb9a..0000000 --- a/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +++ /dev/null @@ -1,13 +0,0 @@ -import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.js"; -function _objectWithoutProperties(e, t) { - if (null == e) return {}; - var o, - r, - i = objectWithoutPropertiesLoose(e, t); - if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); - } - return i; -} -export { _objectWithoutProperties as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js b/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js deleted file mode 100644 index 90f68f3..0000000 --- a/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +++ /dev/null @@ -1,10 +0,0 @@ -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (-1 !== e.indexOf(n)) continue; - t[n] = r[n]; - } - return t; -} -export { _objectWithoutPropertiesLoose as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/package.json b/node_modules/@babel/runtime/helpers/esm/package.json deleted file mode 100644 index aead43d..0000000 --- a/node_modules/@babel/runtime/helpers/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js b/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js deleted file mode 100644 index d84e1e6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +++ /dev/null @@ -1,8 +0,0 @@ -import _typeof from "./typeof.js"; -import assertThisInitialized from "./assertThisInitialized.js"; -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -export { _possibleConstructorReturn as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/readOnlyError.js b/node_modules/@babel/runtime/helpers/esm/readOnlyError.js deleted file mode 100644 index fcc3e33..0000000 --- a/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -export { _readOnlyError as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regenerator.js b/node_modules/@babel/runtime/helpers/esm/regenerator.js deleted file mode 100644 index 6f2f2a1..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regenerator.js +++ /dev/null @@ -1,89 +0,0 @@ -import regeneratorDefine from "./regeneratorDefine.js"; -function _regenerator() { - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ - var e, - t, - r = "function" == typeof Symbol ? Symbol : {}, - n = r.iterator || "@@iterator", - o = r.toStringTag || "@@toStringTag"; - function i(r, n, o, i) { - var c = n && n.prototype instanceof Generator ? n : Generator, - u = Object.create(c.prototype); - return regeneratorDefine(u, "_invoke", function (r, n, o) { - var i, - c, - u, - f = 0, - p = o || [], - y = !1, - G = { - p: 0, - n: 0, - v: e, - a: d, - f: d.bind(e, 4), - d: function d(t, r) { - return i = t, c = 0, u = e, G.n = r, a; - } - }; - function d(r, n) { - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { - var o, - i = p[t], - d = G.p, - l = i[2]; - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); - } - if (o || r > 1) return a; - throw y = !0, n; - } - return function (o, p, l) { - if (f > 1) throw TypeError("Generator is already running"); - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); - try { - if (f = 2, i) { - if (c || (o = "next"), t = i[o]) { - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); - if (!t.done) return t; - u = t.value, c < 2 && (c = 0); - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); - i = e; - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; - } catch (t) { - i = e, c = 1, u = t; - } finally { - f = 1; - } - } - return { - value: t, - done: y - }; - }; - }(r, o, i), !0), u; - } - var a = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - t = Object.getPrototypeOf; - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { - return this; - }), t), - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); - function f(e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { - return this; - }), regeneratorDefine(u, "toString", function () { - return "[object Generator]"; - }), (_regenerator = function _regenerator() { - return { - w: i, - m: f - }; - })(); -} -export { _regenerator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js b/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js deleted file mode 100644 index f73d4e6..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js +++ /dev/null @@ -1,8 +0,0 @@ -import regeneratorAsyncGen from "./regeneratorAsyncGen.js"; -function _regeneratorAsync(n, e, r, t, o) { - var a = regeneratorAsyncGen(n, e, r, t, o); - return a.next().then(function (n) { - return n.done ? n.value : a.next(); - }); -} -export { _regeneratorAsync as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js b/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js deleted file mode 100644 index 1932bcd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js +++ /dev/null @@ -1,6 +0,0 @@ -import regenerator from "./regenerator.js"; -import regeneratorAsyncIterator from "./regeneratorAsyncIterator.js"; -function _regeneratorAsyncGen(r, e, t, o, n) { - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); -} -export { _regeneratorAsyncGen as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js b/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js deleted file mode 100644 index 90d84cc..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js +++ /dev/null @@ -1,33 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -import regeneratorDefine from "./regeneratorDefine.js"; -function AsyncIterator(t, e) { - function n(r, o, i, f) { - try { - var c = t[r](o), - u = c.value; - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { - n("next", t, i, f); - }, function (t) { - n("throw", t, i, f); - }) : e.resolve(u).then(function (t) { - c.value = t, i(c); - }, function (t) { - return n("throw", t, i, f); - }); - } catch (t) { - f(t); - } - } - var r; - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { - return this; - })), regeneratorDefine(this, "_invoke", function (t, o, i) { - function f() { - return new e(function (e, r) { - n(t, i, e, r); - }); - } - return r = r ? r.then(f, f) : f(); - }, !0); -} -export { AsyncIterator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js b/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js deleted file mode 100644 index 7140470..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js +++ /dev/null @@ -1,22 +0,0 @@ -function _regeneratorDefine(e, r, n, t) { - var i = Object.defineProperty; - try { - i({}, "", {}); - } catch (e) { - i = 0; - } - _regeneratorDefine = function regeneratorDefine(e, r, n, t) { - function o(r, n) { - _regeneratorDefine(e, r, function (e) { - return this._invoke(r, n, e); - }); - } - r ? i ? i(e, r, { - value: n, - enumerable: !t, - configurable: !t, - writable: !t - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); - }, _regeneratorDefine(e, r, n, t); -} -export { _regeneratorDefine as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js b/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js deleted file mode 100644 index 5d0d48b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js +++ /dev/null @@ -1,10 +0,0 @@ -function _regeneratorKeys(e) { - var n = Object(e), - r = []; - for (var t in n) r.unshift(t); - return function e() { - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; - return e.done = !0, e; - }; -} -export { _regeneratorKeys as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js b/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js deleted file mode 100644 index 3350188..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +++ /dev/null @@ -1,77 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -import regenerator from "./regenerator.js"; -import regeneratorAsync from "./regeneratorAsync.js"; -import regeneratorAsyncGen from "./regeneratorAsyncGen.js"; -import regeneratorAsyncIterator from "./regeneratorAsyncIterator.js"; -import regeneratorKeys from "./regeneratorKeys.js"; -import regeneratorValues from "./regeneratorValues.js"; -function _regeneratorRuntime() { - "use strict"; - - var r = regenerator(), - e = r.m(_regeneratorRuntime), - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; - function n(r) { - var e = "function" == typeof r && r.constructor; - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); - } - var o = { - "throw": 1, - "return": 2, - "break": 3, - "continue": 3 - }; - function a(r) { - var e, t; - return function (n) { - e || (e = { - stop: function stop() { - return t(n.a, 2); - }, - "catch": function _catch() { - return n.v; - }, - abrupt: function abrupt(r, e) { - return t(n.a, o[r], e); - }, - delegateYield: function delegateYield(r, o, a) { - return e.resultName = o, t(n.d, regeneratorValues(r), a); - }, - finish: function finish(r) { - return t(n.f, r); - } - }, t = function t(r, _t, o) { - n.p = e.prev, n.n = e.next; - try { - return r(_t, o); - } finally { - e.next = n.n; - } - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; - try { - return r.call(this, e); - } finally { - n.p = e.prev, n.n = e.next; - } - }; - } - return (_regeneratorRuntime = function _regeneratorRuntime() { - return { - wrap: function wrap(e, t, n, o) { - return r.w(a(e), t, n, o && o.reverse()); - }, - isGeneratorFunction: n, - mark: r.m, - awrap: function awrap(r, e) { - return new OverloadYield(r, e); - }, - AsyncIterator: regeneratorAsyncIterator, - async: function async(r, e, t, o, u) { - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); - }, - keys: regeneratorKeys, - values: regeneratorValues - }; - })(); -} -export { _regeneratorRuntime as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js b/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js deleted file mode 100644 index 9996852..0000000 --- a/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js +++ /dev/null @@ -1,19 +0,0 @@ -import _typeof from "./typeof.js"; -function _regeneratorValues(e) { - if (null != e) { - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], - r = 0; - if (t) return t.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) return { - next: function next() { - return e && r >= e.length && (e = void 0), { - value: e && e[r++], - done: !e - }; - } - }; - } - throw new TypeError(_typeof(e) + " is not iterable"); -} -export { _regeneratorValues as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/set.js b/node_modules/@babel/runtime/helpers/esm/set.js deleted file mode 100644 index ed0a803..0000000 --- a/node_modules/@babel/runtime/helpers/esm/set.js +++ /dev/null @@ -1,22 +0,0 @@ -import superPropBase from "./superPropBase.js"; -import defineProperty from "./defineProperty.js"; -function set(e, r, t, o) { - return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) { - var f, - i = superPropBase(e, r); - if (i) { - if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0; - if (!f.writable) return !1; - } - if (f = Object.getOwnPropertyDescriptor(o, r)) { - if (!f.writable) return !1; - f.value = t, Object.defineProperty(o, r, f); - } else defineProperty(o, r, t); - return !0; - }, set(e, r, t, o); -} -function _set(e, r, t, o, f) { - if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property"); - return t; -} -export { _set as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/setFunctionName.js b/node_modules/@babel/runtime/helpers/esm/setFunctionName.js deleted file mode 100644 index 82213ce..0000000 --- a/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +++ /dev/null @@ -1,12 +0,0 @@ -import _typeof from "./typeof.js"; -function setFunctionName(e, t, n) { - "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); - try { - Object.defineProperty(e, "name", { - configurable: !0, - value: n ? n + " " + t : t - }); - } catch (e) {} - return e; -} -export { setFunctionName as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js b/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js deleted file mode 100644 index c30983c..0000000 --- a/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _setPrototypeOf(t, e) { - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, _setPrototypeOf(t, e); -} -export { _setPrototypeOf as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js b/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js deleted file mode 100644 index 41d5738..0000000 --- a/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +++ /dev/null @@ -1,7 +0,0 @@ -function _skipFirstGeneratorNext(t) { - return function () { - var r = t.apply(this, arguments); - return r.next(), r; - }; -} -export { _skipFirstGeneratorNext as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/slicedToArray.js b/node_modules/@babel/runtime/helpers/esm/slicedToArray.js deleted file mode 100644 index c044c2a..0000000 --- a/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithHoles from "./arrayWithHoles.js"; -import iterableToArrayLimit from "./iterableToArrayLimit.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableRest from "./nonIterableRest.js"; -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -export { _slicedToArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/superPropBase.js b/node_modules/@babel/runtime/helpers/esm/superPropBase.js deleted file mode 100644 index a5fa386..0000000 --- a/node_modules/@babel/runtime/helpers/esm/superPropBase.js +++ /dev/null @@ -1,6 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -export { _superPropBase as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/superPropGet.js b/node_modules/@babel/runtime/helpers/esm/superPropGet.js deleted file mode 100644 index b2b60a8..0000000 --- a/node_modules/@babel/runtime/helpers/esm/superPropGet.js +++ /dev/null @@ -1,9 +0,0 @@ -import get from "./get.js"; -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropGet(t, o, e, r) { - var p = get(getPrototypeOf(1 & r ? t.prototype : t), o, e); - return 2 & r && "function" == typeof p ? function (t) { - return p.apply(e, t); - } : p; -} -export { _superPropGet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/superPropSet.js b/node_modules/@babel/runtime/helpers/esm/superPropSet.js deleted file mode 100644 index e182f38..0000000 --- a/node_modules/@babel/runtime/helpers/esm/superPropSet.js +++ /dev/null @@ -1,6 +0,0 @@ -import set from "./set.js"; -import getPrototypeOf from "./getPrototypeOf.js"; -function _superPropSet(t, e, o, r, p, f) { - return set(getPrototypeOf(f ? t.prototype : t), e, o, r, p); -} -export { _superPropSet as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js deleted file mode 100644 index 3d842cd..0000000 --- a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +++ /dev/null @@ -1,8 +0,0 @@ -function _taggedTemplateLiteral(e, t) { - return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { - raw: { - value: Object.freeze(t) - } - })); -} -export { _taggedTemplateLiteral as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js b/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js deleted file mode 100644 index 741aeb8..0000000 --- a/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,4 +0,0 @@ -function _taggedTemplateLiteralLoose(e, t) { - return t || (t = e.slice(0)), e.raw = t, e; -} -export { _taggedTemplateLiteralLoose as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/tdz.js b/node_modules/@babel/runtime/helpers/esm/tdz.js deleted file mode 100644 index 58df493..0000000 --- a/node_modules/@babel/runtime/helpers/esm/tdz.js +++ /dev/null @@ -1,4 +0,0 @@ -function _tdzError(e) { - throw new ReferenceError(e + " is not defined - temporal dead zone"); -} -export { _tdzError as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/temporalRef.js b/node_modules/@babel/runtime/helpers/esm/temporalRef.js deleted file mode 100644 index 8dbf014..0000000 --- a/node_modules/@babel/runtime/helpers/esm/temporalRef.js +++ /dev/null @@ -1,6 +0,0 @@ -import temporalUndefined from "./temporalUndefined.js"; -import tdz from "./tdz.js"; -function _temporalRef(r, e) { - return r === temporalUndefined ? tdz(e) : r; -} -export { _temporalRef as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js b/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js deleted file mode 100644 index 2ec0b0d..0000000 --- a/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +++ /dev/null @@ -1,2 +0,0 @@ -function _temporalUndefined() {} -export { _temporalUndefined as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/toArray.js b/node_modules/@babel/runtime/helpers/esm/toArray.js deleted file mode 100644 index e5f0f52..0000000 --- a/node_modules/@babel/runtime/helpers/esm/toArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithHoles from "./arrayWithHoles.js"; -import iterableToArray from "./iterableToArray.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableRest from "./nonIterableRest.js"; -function _toArray(r) { - return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest(); -} -export { _toArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js b/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js deleted file mode 100644 index f7338e4..0000000 --- a/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +++ /dev/null @@ -1,8 +0,0 @@ -import arrayWithoutHoles from "./arrayWithoutHoles.js"; -import iterableToArray from "./iterableToArray.js"; -import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; -import nonIterableSpread from "./nonIterableSpread.js"; -function _toConsumableArray(r) { - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); -} -export { _toConsumableArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/toPrimitive.js b/node_modules/@babel/runtime/helpers/esm/toPrimitive.js deleted file mode 100644 index 9a3de46..0000000 --- a/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +++ /dev/null @@ -1,12 +0,0 @@ -import _typeof from "./typeof.js"; -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -export { toPrimitive as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js b/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js deleted file mode 100644 index b3274d8..0000000 --- a/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +++ /dev/null @@ -1,7 +0,0 @@ -import _typeof from "./typeof.js"; -import toPrimitive from "./toPrimitive.js"; -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -export { toPropertyKey as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/toSetter.js b/node_modules/@babel/runtime/helpers/esm/toSetter.js deleted file mode 100644 index b1dbf7a..0000000 --- a/node_modules/@babel/runtime/helpers/esm/toSetter.js +++ /dev/null @@ -1,10 +0,0 @@ -function _toSetter(t, e, n) { - e || (e = []); - var r = e.length++; - return Object.defineProperty({}, "_", { - set: function set(o) { - e[r] = o, t.apply(n, e); - } - }); -} -export { _toSetter as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js b/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js deleted file mode 100644 index 28ffc0b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +++ /dev/null @@ -1,6 +0,0 @@ -function tsRewriteRelativeImportExtensions(t, e) { - return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { - return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; - }) : t; -} -export { tsRewriteRelativeImportExtensions as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/typeof.js b/node_modules/@babel/runtime/helpers/esm/typeof.js deleted file mode 100644 index 5b0bc9b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/typeof.js +++ /dev/null @@ -1,10 +0,0 @@ -function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); -} -export { _typeof as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js b/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js deleted file mode 100644 index 33adc49..0000000 --- a/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +++ /dev/null @@ -1,9 +0,0 @@ -import arrayLikeToArray from "./arrayLikeToArray.js"; -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -export { _unsupportedIterableToArray as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/using.js b/node_modules/@babel/runtime/helpers/esm/using.js deleted file mode 100644 index 9bda17b..0000000 --- a/node_modules/@babel/runtime/helpers/esm/using.js +++ /dev/null @@ -1,12 +0,0 @@ -function _using(o, n, e) { - if (null == n) return n; - if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); - return o.push({ - v: n, - d: r, - a: e - }), n; -} -export { _using as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/usingCtx.js b/node_modules/@babel/runtime/helpers/esm/usingCtx.js deleted file mode 100644 index 1464379..0000000 --- a/node_modules/@babel/runtime/helpers/esm/usingCtx.js +++ /dev/null @@ -1,59 +0,0 @@ -function _usingCtx() { - var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) { - var n = Error(); - return n.name = "SuppressedError", n.error = r, n.suppressed = e, n; - }, - e = {}, - n = []; - function using(r, e) { - if (null != e) { - if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o; - if ("function" != typeof o) throw new TypeError("Object is not disposable."); - t && (o = function o() { - try { - t.call(e); - } catch (r) { - return Promise.reject(r); - } - }), n.push({ - v: e, - d: o, - a: r - }); - } else r && n.push({ - d: e, - a: r - }); - return e; - } - return { - e: e, - u: using.bind(null, !1), - a: using.bind(null, !0), - d: function d() { - var o, - t = this.e, - s = 0; - function next() { - for (; o = n.pop();) try { - if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next); - if (o.d) { - var r = o.d.call(o.v); - if (o.a) return s |= 2, Promise.resolve(r).then(next, err); - } else s |= 1; - } catch (r) { - return err(r); - } - if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve(); - if (t !== e) throw t; - } - function err(n) { - return t = t !== e ? new r(n, t) : n, next(); - } - return next(); - } - }; -} -export { _usingCtx as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js b/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js deleted file mode 100644 index ffeea5d..0000000 --- a/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +++ /dev/null @@ -1,69 +0,0 @@ -import OverloadYield from "./OverloadYield.js"; -function _wrapAsyncGenerator(e) { - return function () { - return new AsyncGenerator(e.apply(this, arguments)); - }; -} -function AsyncGenerator(e) { - var r, t; - function resume(r, t) { - try { - var n = e[r](t), - o = n.value, - u = o instanceof OverloadYield; - Promise.resolve(u ? o.v : o).then(function (t) { - if (u) { - var i = "return" === r ? "return" : "next"; - if (!o.k || t.done) return resume(i, t); - t = e[i](t).value; - } - settle(n.done ? "return" : "normal", t); - }, function (e) { - resume("throw", e); - }); - } catch (e) { - settle("throw", e); - } - } - function settle(e, n) { - switch (e) { - case "return": - r.resolve({ - value: n, - done: !0 - }); - break; - case "throw": - r.reject(n); - break; - default: - r.resolve({ - value: n, - done: !1 - }); - } - (r = r.next) ? resume(r.key, r.arg) : t = null; - } - this._invoke = function (e, n) { - return new Promise(function (o, u) { - var i = { - key: e, - arg: n, - resolve: o, - reject: u, - next: null - }; - t ? t = t.next = i : (r = t = i, resume(e, n)); - }); - }, "function" != typeof e["return"] && (this["return"] = void 0); -} -AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { - return this; -}, AsyncGenerator.prototype.next = function (e) { - return this._invoke("next", e); -}, AsyncGenerator.prototype["throw"] = function (e) { - return this._invoke("throw", e); -}, AsyncGenerator.prototype["return"] = function (e) { - return this._invoke("return", e); -}; -export { _wrapAsyncGenerator as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js deleted file mode 100644 index 15bf78f..0000000 --- a/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +++ /dev/null @@ -1,27 +0,0 @@ -import getPrototypeOf from "./getPrototypeOf.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -import isNativeFunction from "./isNativeFunction.js"; -import construct from "./construct.js"; -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, _wrapNativeSuper(t); -} -export { _wrapNativeSuper as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js b/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js deleted file mode 100644 index c455faa..0000000 --- a/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +++ /dev/null @@ -1,52 +0,0 @@ -import _typeof from "./typeof.js"; -import setPrototypeOf from "./setPrototypeOf.js"; -import inherits from "./inherits.js"; -function _wrapRegExp() { - _wrapRegExp = function _wrapRegExp(e, r) { - return new BabelRegExp(e, void 0, r); - }; - var e = RegExp.prototype, - r = new WeakMap(); - function BabelRegExp(e, t, p) { - var o = RegExp(e, t); - return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); - } - function buildGroups(e, t) { - var p = r.get(t); - return Object.keys(p).reduce(function (r, t) { - var o = p[t]; - if ("number" == typeof o) r[t] = e[o];else { - for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; - r[t] = e[o[i]]; - } - return r; - }, Object.create(null)); - } - return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { - var t = e.exec.call(this, r); - if (t) { - t.groups = buildGroups(t, this); - var p = t.indices; - p && (p.groups = buildGroups(p, this)); - } - return t; - }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { - if ("string" == typeof p) { - var o = r.get(this); - return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { - if ("" === t) return e; - var p = o[r]; - return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; - })); - } - if ("function" == typeof p) { - var i = this; - return e[Symbol.replace].call(this, t, function () { - var e = arguments; - return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); - }); - } - return e[Symbol.replace].call(this, t, p); - }, _wrapRegExp.apply(this, arguments); -} -export { _wrapRegExp as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js b/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js deleted file mode 100644 index 250c286..0000000 --- a/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _writeOnlyError(r) { - throw new TypeError('"' + r + '" is write-only'); -} -export { _writeOnlyError as default }; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/extends.js b/node_modules/@babel/runtime/helpers/extends.js deleted file mode 100644 index eee4a1f..0000000 --- a/node_modules/@babel/runtime/helpers/extends.js +++ /dev/null @@ -1,10 +0,0 @@ -function _extends() { - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); -} -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/get.js b/node_modules/@babel/runtime/helpers/get.js deleted file mode 100644 index 15428de..0000000 --- a/node_modules/@babel/runtime/helpers/get.js +++ /dev/null @@ -1,11 +0,0 @@ -var superPropBase = require("./superPropBase.js"); -function _get() { - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); -} -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/getPrototypeOf.js b/node_modules/@babel/runtime/helpers/getPrototypeOf.js deleted file mode 100644 index 9070748..0000000 --- a/node_modules/@babel/runtime/helpers/getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _getPrototypeOf(t) { - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); -} -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/identity.js b/node_modules/@babel/runtime/helpers/identity.js deleted file mode 100644 index 54de5b5..0000000 --- a/node_modules/@babel/runtime/helpers/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -function _identity(t) { - return t; -} -module.exports = _identity, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/importDeferProxy.js b/node_modules/@babel/runtime/helpers/importDeferProxy.js deleted file mode 100644 index cffaae6..0000000 --- a/node_modules/@babel/runtime/helpers/importDeferProxy.js +++ /dev/null @@ -1,27 +0,0 @@ -function _importDeferProxy(e) { - var t = null, - constValue = function constValue(e) { - return function () { - return e; - }; - }, - proxy = function proxy(r) { - return function (n, o, f) { - return null === t && (t = e()), r(t, o, f); - }; - }; - return new Proxy({}, { - defineProperty: constValue(!1), - deleteProperty: constValue(!1), - get: proxy(Reflect.get), - getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor), - getPrototypeOf: constValue(null), - isExtensible: constValue(!1), - has: proxy(Reflect.has), - ownKeys: proxy(Reflect.ownKeys), - preventExtensions: constValue(!0), - set: constValue(!1), - setPrototypeOf: constValue(!1) - }); -} -module.exports = _importDeferProxy, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/inherits.js b/node_modules/@babel/runtime/helpers/inherits.js deleted file mode 100644 index 715a78e..0000000 --- a/node_modules/@babel/runtime/helpers/inherits.js +++ /dev/null @@ -1,14 +0,0 @@ -var setPrototypeOf = require("./setPrototypeOf.js"); -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/inheritsLoose.js b/node_modules/@babel/runtime/helpers/inheritsLoose.js deleted file mode 100644 index a27baf0..0000000 --- a/node_modules/@babel/runtime/helpers/inheritsLoose.js +++ /dev/null @@ -1,5 +0,0 @@ -var setPrototypeOf = require("./setPrototypeOf.js"); -function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o); -} -module.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/initializerDefineProperty.js b/node_modules/@babel/runtime/helpers/initializerDefineProperty.js deleted file mode 100644 index f9fa317..0000000 --- a/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +++ /dev/null @@ -1,9 +0,0 @@ -function _initializerDefineProperty(e, i, r, l) { - r && Object.defineProperty(e, i, { - enumerable: r.enumerable, - configurable: r.configurable, - writable: r.writable, - value: r.initializer ? r.initializer.call(l) : void 0 - }); -} -module.exports = _initializerDefineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/initializerWarningHelper.js b/node_modules/@babel/runtime/helpers/initializerWarningHelper.js deleted file mode 100644 index e14ce59..0000000 --- a/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +++ /dev/null @@ -1,4 +0,0 @@ -function _initializerWarningHelper(r, e) { - throw Error("Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform."); -} -module.exports = _initializerWarningHelper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/instanceof.js b/node_modules/@babel/runtime/helpers/instanceof.js deleted file mode 100644 index 9952301..0000000 --- a/node_modules/@babel/runtime/helpers/instanceof.js +++ /dev/null @@ -1,4 +0,0 @@ -function _instanceof(n, e) { - return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](n) : n instanceof e; -} -module.exports = _instanceof, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/interopRequireDefault.js b/node_modules/@babel/runtime/helpers/interopRequireDefault.js deleted file mode 100644 index 6944715..0000000 --- a/node_modules/@babel/runtime/helpers/interopRequireDefault.js +++ /dev/null @@ -1,6 +0,0 @@ -function _interopRequireDefault(e) { - return e && e.__esModule ? e : { - "default": e - }; -} -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/interopRequireWildcard.js b/node_modules/@babel/runtime/helpers/interopRequireWildcard.js deleted file mode 100644 index d5f1054..0000000 --- a/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +++ /dev/null @@ -1,22 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _interopRequireWildcard(e, t) { - if ("function" == typeof WeakMap) var r = new WeakMap(), - n = new WeakMap(); - return (module.exports = _interopRequireWildcard = function _interopRequireWildcard(e, t) { - if (!t && e && e.__esModule) return e; - var o, - i, - f = { - __proto__: null, - "default": e - }; - if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; - if (o = t ? n : r) { - if (o.has(e)) return o.get(e); - o.set(e, f); - } - for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); - return f; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t); -} -module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/isNativeFunction.js b/node_modules/@babel/runtime/helpers/isNativeFunction.js deleted file mode 100644 index f0eb49e..0000000 --- a/node_modules/@babel/runtime/helpers/isNativeFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js b/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js deleted file mode 100644 index b677e10..0000000 --- a/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +++ /dev/null @@ -1,9 +0,0 @@ -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/iterableToArray.js b/node_modules/@babel/runtime/helpers/iterableToArray.js deleted file mode 100644 index c839a32..0000000 --- a/node_modules/@babel/runtime/helpers/iterableToArray.js +++ /dev/null @@ -1,4 +0,0 @@ -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js b/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js deleted file mode 100644 index 2671778..0000000 --- a/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +++ /dev/null @@ -1,28 +0,0 @@ -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/jsx.js b/node_modules/@babel/runtime/helpers/jsx.js deleted file mode 100644 index 3415eea..0000000 --- a/node_modules/@babel/runtime/helpers/jsx.js +++ /dev/null @@ -1,22 +0,0 @@ -var REACT_ELEMENT_TYPE; -function _createRawReactElement(e, r, E, l) { - REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); - var o = e && e.defaultProps, - n = arguments.length - 3; - if (r || 0 === n || (r = { - children: void 0 - }), 1 === n) r.children = l;else if (n > 1) { - for (var t = Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; - r.children = t; - } - if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); - return { - $$typeof: REACT_ELEMENT_TYPE, - type: e, - key: void 0 === E ? null : "" + E, - ref: null, - props: r, - _owner: null - }; -} -module.exports = _createRawReactElement, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/maybeArrayLike.js b/node_modules/@babel/runtime/helpers/maybeArrayLike.js deleted file mode 100644 index 9873cc7..0000000 --- a/node_modules/@babel/runtime/helpers/maybeArrayLike.js +++ /dev/null @@ -1,9 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _maybeArrayLike(r, a, e) { - if (a && !Array.isArray(a) && "number" == typeof a.length) { - var y = a.length; - return arrayLikeToArray(a, void 0 !== e && e < y ? e : y); - } - return r(a, e); -} -module.exports = _maybeArrayLike, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/newArrowCheck.js b/node_modules/@babel/runtime/helpers/newArrowCheck.js deleted file mode 100644 index 8e74d99..0000000 --- a/node_modules/@babel/runtime/helpers/newArrowCheck.js +++ /dev/null @@ -1,4 +0,0 @@ -function _newArrowCheck(n, r) { - if (n !== r) throw new TypeError("Cannot instantiate an arrow function"); -} -module.exports = _newArrowCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/nonIterableRest.js b/node_modules/@babel/runtime/helpers/nonIterableRest.js deleted file mode 100644 index 95265ba..0000000 --- a/node_modules/@babel/runtime/helpers/nonIterableRest.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/nonIterableSpread.js b/node_modules/@babel/runtime/helpers/nonIterableSpread.js deleted file mode 100644 index 3fcf23f..0000000 --- a/node_modules/@babel/runtime/helpers/nonIterableSpread.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/nullishReceiverError.js b/node_modules/@babel/runtime/helpers/nullishReceiverError.js deleted file mode 100644 index 970e023..0000000 --- a/node_modules/@babel/runtime/helpers/nullishReceiverError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _nullishReceiverError(r) { - throw new TypeError("Cannot set property of null or undefined."); -} -module.exports = _nullishReceiverError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js b/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js deleted file mode 100644 index 9f62a1b..0000000 --- a/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +++ /dev/null @@ -1,4 +0,0 @@ -function _objectDestructuringEmpty(t) { - if (null == t) throw new TypeError("Cannot destructure " + t); -} -module.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/objectSpread.js b/node_modules/@babel/runtime/helpers/objectSpread.js deleted file mode 100644 index a367643..0000000 --- a/node_modules/@babel/runtime/helpers/objectSpread.js +++ /dev/null @@ -1,14 +0,0 @@ -var defineProperty = require("./defineProperty.js"); -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? Object(arguments[r]) : {}, - o = Object.keys(t); - "function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), o.forEach(function (r) { - defineProperty(e, r, t[r]); - }); - } - return e; -} -module.exports = _objectSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/objectSpread2.js b/node_modules/@babel/runtime/helpers/objectSpread2.js deleted file mode 100644 index 4f3b9fa..0000000 --- a/node_modules/@babel/runtime/helpers/objectSpread2.js +++ /dev/null @@ -1,23 +0,0 @@ -var defineProperty = require("./defineProperty.js"); -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/objectWithoutProperties.js b/node_modules/@babel/runtime/helpers/objectWithoutProperties.js deleted file mode 100644 index 3a40f9e..0000000 --- a/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +++ /dev/null @@ -1,13 +0,0 @@ -var objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose.js"); -function _objectWithoutProperties(e, t) { - if (null == e) return {}; - var o, - r, - i = objectWithoutPropertiesLoose(e, t); - if (Object.getOwnPropertySymbols) { - var n = Object.getOwnPropertySymbols(e); - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); - } - return i; -} -module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js b/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js deleted file mode 100644 index c243acd..0000000 --- a/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +++ /dev/null @@ -1,10 +0,0 @@ -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (-1 !== e.indexOf(n)) continue; - t[n] = r[n]; - } - return t; -} -module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js b/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js deleted file mode 100644 index 06e6e6d..0000000 --- a/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +++ /dev/null @@ -1,8 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var assertThisInitialized = require("./assertThisInitialized.js"); -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/readOnlyError.js b/node_modules/@babel/runtime/helpers/readOnlyError.js deleted file mode 100644 index 1bf3e09..0000000 --- a/node_modules/@babel/runtime/helpers/readOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _readOnlyError(r) { - throw new TypeError('"' + r + '" is read-only'); -} -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regenerator.js b/node_modules/@babel/runtime/helpers/regenerator.js deleted file mode 100644 index 0cf8710..0000000 --- a/node_modules/@babel/runtime/helpers/regenerator.js +++ /dev/null @@ -1,89 +0,0 @@ -var regeneratorDefine = require("./regeneratorDefine.js"); -function _regenerator() { - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ - var e, - t, - r = "function" == typeof Symbol ? Symbol : {}, - n = r.iterator || "@@iterator", - o = r.toStringTag || "@@toStringTag"; - function i(r, n, o, i) { - var c = n && n.prototype instanceof Generator ? n : Generator, - u = Object.create(c.prototype); - return regeneratorDefine(u, "_invoke", function (r, n, o) { - var i, - c, - u, - f = 0, - p = o || [], - y = !1, - G = { - p: 0, - n: 0, - v: e, - a: d, - f: d.bind(e, 4), - d: function d(t, r) { - return i = t, c = 0, u = e, G.n = r, a; - } - }; - function d(r, n) { - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { - var o, - i = p[t], - d = G.p, - l = i[2]; - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); - } - if (o || r > 1) return a; - throw y = !0, n; - } - return function (o, p, l) { - if (f > 1) throw TypeError("Generator is already running"); - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); - try { - if (f = 2, i) { - if (c || (o = "next"), t = i[o]) { - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); - if (!t.done) return t; - u = t.value, c < 2 && (c = 0); - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); - i = e; - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; - } catch (t) { - i = e, c = 1, u = t; - } finally { - f = 1; - } - } - return { - value: t, - done: y - }; - }; - }(r, o, i), !0), u; - } - var a = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - t = Object.getPrototypeOf; - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { - return this; - }), t), - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); - function f(e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { - return this; - }), regeneratorDefine(u, "toString", function () { - return "[object Generator]"; - }), (module.exports = _regenerator = function _regenerator() { - return { - w: i, - m: f - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorAsync.js b/node_modules/@babel/runtime/helpers/regeneratorAsync.js deleted file mode 100644 index d1e4c3f..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorAsync.js +++ /dev/null @@ -1,8 +0,0 @@ -var regeneratorAsyncGen = require("./regeneratorAsyncGen.js"); -function _regeneratorAsync(n, e, r, t, o) { - var a = regeneratorAsyncGen(n, e, r, t, o); - return a.next().then(function (n) { - return n.done ? n.value : a.next(); - }); -} -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js b/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js deleted file mode 100644 index f0212e3..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +++ /dev/null @@ -1,6 +0,0 @@ -var regenerator = require("./regenerator.js"); -var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js"); -function _regeneratorAsyncGen(r, e, t, o, n) { - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); -} -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js b/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js deleted file mode 100644 index afcb060..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +++ /dev/null @@ -1,33 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -var regeneratorDefine = require("./regeneratorDefine.js"); -function AsyncIterator(t, e) { - function n(r, o, i, f) { - try { - var c = t[r](o), - u = c.value; - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { - n("next", t, i, f); - }, function (t) { - n("throw", t, i, f); - }) : e.resolve(u).then(function (t) { - c.value = t, i(c); - }, function (t) { - return n("throw", t, i, f); - }); - } catch (t) { - f(t); - } - } - var r; - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { - return this; - })), regeneratorDefine(this, "_invoke", function (t, o, i) { - function f() { - return new e(function (e, r) { - n(t, i, e, r); - }); - } - return r = r ? r.then(f, f) : f(); - }, !0); -} -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorDefine.js b/node_modules/@babel/runtime/helpers/regeneratorDefine.js deleted file mode 100644 index 8d7ffe0..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorDefine.js +++ /dev/null @@ -1,22 +0,0 @@ -function _regeneratorDefine(e, r, n, t) { - var i = Object.defineProperty; - try { - i({}, "", {}); - } catch (e) { - i = 0; - } - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { - function o(r, n) { - _regeneratorDefine(e, r, function (e) { - return this._invoke(r, n, e); - }); - } - r ? i ? i(e, r, { - value: n, - enumerable: !t, - configurable: !t, - writable: !t - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); -} -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorKeys.js b/node_modules/@babel/runtime/helpers/regeneratorKeys.js deleted file mode 100644 index 99442bd..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorKeys.js +++ /dev/null @@ -1,10 +0,0 @@ -function _regeneratorKeys(e) { - var n = Object(e), - r = []; - for (var t in n) r.unshift(t); - return function e() { - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; - return e.done = !0, e; - }; -} -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorRuntime.js b/node_modules/@babel/runtime/helpers/regeneratorRuntime.js deleted file mode 100644 index 24baaa0..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +++ /dev/null @@ -1,77 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -var regenerator = require("./regenerator.js"); -var regeneratorAsync = require("./regeneratorAsync.js"); -var regeneratorAsyncGen = require("./regeneratorAsyncGen.js"); -var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js"); -var regeneratorKeys = require("./regeneratorKeys.js"); -var regeneratorValues = require("./regeneratorValues.js"); -function _regeneratorRuntime() { - "use strict"; - - var r = regenerator(), - e = r.m(_regeneratorRuntime), - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; - function n(r) { - var e = "function" == typeof r && r.constructor; - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); - } - var o = { - "throw": 1, - "return": 2, - "break": 3, - "continue": 3 - }; - function a(r) { - var e, t; - return function (n) { - e || (e = { - stop: function stop() { - return t(n.a, 2); - }, - "catch": function _catch() { - return n.v; - }, - abrupt: function abrupt(r, e) { - return t(n.a, o[r], e); - }, - delegateYield: function delegateYield(r, o, a) { - return e.resultName = o, t(n.d, regeneratorValues(r), a); - }, - finish: function finish(r) { - return t(n.f, r); - } - }, t = function t(r, _t, o) { - n.p = e.prev, n.n = e.next; - try { - return r(_t, o); - } finally { - e.next = n.n; - } - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; - try { - return r.call(this, e); - } finally { - n.p = e.prev, n.n = e.next; - } - }; - } - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return { - wrap: function wrap(e, t, n, o) { - return r.w(a(e), t, n, o && o.reverse()); - }, - isGeneratorFunction: n, - mark: r.m, - awrap: function awrap(r, e) { - return new OverloadYield(r, e); - }, - AsyncIterator: regeneratorAsyncIterator, - async: function async(r, e, t, o, u) { - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); - }, - keys: regeneratorKeys, - values: regeneratorValues - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/regeneratorValues.js b/node_modules/@babel/runtime/helpers/regeneratorValues.js deleted file mode 100644 index 1335a23..0000000 --- a/node_modules/@babel/runtime/helpers/regeneratorValues.js +++ /dev/null @@ -1,19 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function _regeneratorValues(e) { - if (null != e) { - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], - r = 0; - if (t) return t.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) return { - next: function next() { - return e && r >= e.length && (e = void 0), { - value: e && e[r++], - done: !e - }; - } - }; - } - throw new TypeError(_typeof(e) + " is not iterable"); -} -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/set.js b/node_modules/@babel/runtime/helpers/set.js deleted file mode 100644 index 6421470..0000000 --- a/node_modules/@babel/runtime/helpers/set.js +++ /dev/null @@ -1,22 +0,0 @@ -var superPropBase = require("./superPropBase.js"); -var defineProperty = require("./defineProperty.js"); -function set(e, r, t, o) { - return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) { - var f, - i = superPropBase(e, r); - if (i) { - if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0; - if (!f.writable) return !1; - } - if (f = Object.getOwnPropertyDescriptor(o, r)) { - if (!f.writable) return !1; - f.value = t, Object.defineProperty(o, r, f); - } else defineProperty(o, r, t); - return !0; - }, set(e, r, t, o); -} -function _set(e, r, t, o, f) { - if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property"); - return t; -} -module.exports = _set, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/setFunctionName.js b/node_modules/@babel/runtime/helpers/setFunctionName.js deleted file mode 100644 index 9664076..0000000 --- a/node_modules/@babel/runtime/helpers/setFunctionName.js +++ /dev/null @@ -1,12 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function setFunctionName(e, t, n) { - "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); - try { - Object.defineProperty(e, "name", { - configurable: !0, - value: n ? n + " " + t : t - }); - } catch (e) {} - return e; -} -module.exports = setFunctionName, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/setPrototypeOf.js b/node_modules/@babel/runtime/helpers/setPrototypeOf.js deleted file mode 100644 index 7d991ff..0000000 --- a/node_modules/@babel/runtime/helpers/setPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -function _setPrototypeOf(t, e) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); -} -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js b/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js deleted file mode 100644 index 2aed548..0000000 --- a/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +++ /dev/null @@ -1,7 +0,0 @@ -function _skipFirstGeneratorNext(t) { - return function () { - var r = t.apply(this, arguments); - return r.next(), r; - }; -} -module.exports = _skipFirstGeneratorNext, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/slicedToArray.js b/node_modules/@babel/runtime/helpers/slicedToArray.js deleted file mode 100644 index 3d752c4..0000000 --- a/node_modules/@babel/runtime/helpers/slicedToArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithHoles = require("./arrayWithHoles.js"); -var iterableToArrayLimit = require("./iterableToArrayLimit.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableRest = require("./nonIterableRest.js"); -function _slicedToArray(r, e) { - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); -} -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/superPropBase.js b/node_modules/@babel/runtime/helpers/superPropBase.js deleted file mode 100644 index 5cad459..0000000 --- a/node_modules/@babel/runtime/helpers/superPropBase.js +++ /dev/null @@ -1,6 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); - return t; -} -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/superPropGet.js b/node_modules/@babel/runtime/helpers/superPropGet.js deleted file mode 100644 index baf8b10..0000000 --- a/node_modules/@babel/runtime/helpers/superPropGet.js +++ /dev/null @@ -1,9 +0,0 @@ -var get = require("./get.js"); -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropGet(t, o, e, r) { - var p = get(getPrototypeOf(1 & r ? t.prototype : t), o, e); - return 2 & r && "function" == typeof p ? function (t) { - return p.apply(e, t); - } : p; -} -module.exports = _superPropGet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/superPropSet.js b/node_modules/@babel/runtime/helpers/superPropSet.js deleted file mode 100644 index e0578c0..0000000 --- a/node_modules/@babel/runtime/helpers/superPropSet.js +++ /dev/null @@ -1,6 +0,0 @@ -var set = require("./set.js"); -var getPrototypeOf = require("./getPrototypeOf.js"); -function _superPropSet(t, e, o, r, p, f) { - return set(getPrototypeOf(f ? t.prototype : t), e, o, r, p); -} -module.exports = _superPropSet, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js b/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js deleted file mode 100644 index 38d6065..0000000 --- a/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +++ /dev/null @@ -1,8 +0,0 @@ -function _taggedTemplateLiteral(e, t) { - return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { - raw: { - value: Object.freeze(t) - } - })); -} -module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js b/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js deleted file mode 100644 index 2f8c146..0000000 --- a/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,4 +0,0 @@ -function _taggedTemplateLiteralLoose(e, t) { - return t || (t = e.slice(0)), e.raw = t, e; -} -module.exports = _taggedTemplateLiteralLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/tdz.js b/node_modules/@babel/runtime/helpers/tdz.js deleted file mode 100644 index c66f476..0000000 --- a/node_modules/@babel/runtime/helpers/tdz.js +++ /dev/null @@ -1,4 +0,0 @@ -function _tdzError(e) { - throw new ReferenceError(e + " is not defined - temporal dead zone"); -} -module.exports = _tdzError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/temporalRef.js b/node_modules/@babel/runtime/helpers/temporalRef.js deleted file mode 100644 index 54c9190..0000000 --- a/node_modules/@babel/runtime/helpers/temporalRef.js +++ /dev/null @@ -1,6 +0,0 @@ -var temporalUndefined = require("./temporalUndefined.js"); -var tdz = require("./tdz.js"); -function _temporalRef(r, e) { - return r === temporalUndefined ? tdz(e) : r; -} -module.exports = _temporalRef, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/temporalUndefined.js b/node_modules/@babel/runtime/helpers/temporalUndefined.js deleted file mode 100644 index f8def80..0000000 --- a/node_modules/@babel/runtime/helpers/temporalUndefined.js +++ /dev/null @@ -1,2 +0,0 @@ -function _temporalUndefined() {} -module.exports = _temporalUndefined, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/toArray.js b/node_modules/@babel/runtime/helpers/toArray.js deleted file mode 100644 index 2be1d2b..0000000 --- a/node_modules/@babel/runtime/helpers/toArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithHoles = require("./arrayWithHoles.js"); -var iterableToArray = require("./iterableToArray.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableRest = require("./nonIterableRest.js"); -function _toArray(r) { - return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest(); -} -module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/toConsumableArray.js b/node_modules/@babel/runtime/helpers/toConsumableArray.js deleted file mode 100644 index 698f9c6..0000000 --- a/node_modules/@babel/runtime/helpers/toConsumableArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var arrayWithoutHoles = require("./arrayWithoutHoles.js"); -var iterableToArray = require("./iterableToArray.js"); -var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); -var nonIterableSpread = require("./nonIterableSpread.js"); -function _toConsumableArray(r) { - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); -} -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/toPrimitive.js b/node_modules/@babel/runtime/helpers/toPrimitive.js deleted file mode 100644 index ef9d249..0000000 --- a/node_modules/@babel/runtime/helpers/toPrimitive.js +++ /dev/null @@ -1,12 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -function toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/toPropertyKey.js b/node_modules/@babel/runtime/helpers/toPropertyKey.js deleted file mode 100644 index 3ca3d4f..0000000 --- a/node_modules/@babel/runtime/helpers/toPropertyKey.js +++ /dev/null @@ -1,7 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var toPrimitive = require("./toPrimitive.js"); -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/toSetter.js b/node_modules/@babel/runtime/helpers/toSetter.js deleted file mode 100644 index e0012a8..0000000 --- a/node_modules/@babel/runtime/helpers/toSetter.js +++ /dev/null @@ -1,10 +0,0 @@ -function _toSetter(t, e, n) { - e || (e = []); - var r = e.length++; - return Object.defineProperty({}, "_", { - set: function set(o) { - e[r] = o, t.apply(n, e); - } - }); -} -module.exports = _toSetter, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js b/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js deleted file mode 100644 index 4de0e4d..0000000 --- a/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +++ /dev/null @@ -1,6 +0,0 @@ -function tsRewriteRelativeImportExtensions(t, e) { - return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) { - return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t; - }) : t; -} -module.exports = tsRewriteRelativeImportExtensions, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/typeof.js b/node_modules/@babel/runtime/helpers/typeof.js deleted file mode 100644 index b6fbfaf..0000000 --- a/node_modules/@babel/runtime/helpers/typeof.js +++ /dev/null @@ -1,10 +0,0 @@ -function _typeof(o) { - "@babel/helpers - typeof"; - - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); -} -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js b/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js deleted file mode 100644 index 8fb1a71..0000000 --- a/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +++ /dev/null @@ -1,9 +0,0 @@ -var arrayLikeToArray = require("./arrayLikeToArray.js"); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; - } -} -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/using.js b/node_modules/@babel/runtime/helpers/using.js deleted file mode 100644 index 37c79e2..0000000 --- a/node_modules/@babel/runtime/helpers/using.js +++ /dev/null @@ -1,12 +0,0 @@ -function _using(o, n, e) { - if (null == n) return n; - if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); - return o.push({ - v: n, - d: r, - a: e - }), n; -} -module.exports = _using, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/usingCtx.js b/node_modules/@babel/runtime/helpers/usingCtx.js deleted file mode 100644 index 652ab15..0000000 --- a/node_modules/@babel/runtime/helpers/usingCtx.js +++ /dev/null @@ -1,59 +0,0 @@ -function _usingCtx() { - var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) { - var n = Error(); - return n.name = "SuppressedError", n.error = r, n.suppressed = e, n; - }, - e = {}, - n = []; - function using(r, e) { - if (null != e) { - if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); - if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; - if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o; - if ("function" != typeof o) throw new TypeError("Object is not disposable."); - t && (o = function o() { - try { - t.call(e); - } catch (r) { - return Promise.reject(r); - } - }), n.push({ - v: e, - d: o, - a: r - }); - } else r && n.push({ - d: e, - a: r - }); - return e; - } - return { - e: e, - u: using.bind(null, !1), - a: using.bind(null, !0), - d: function d() { - var o, - t = this.e, - s = 0; - function next() { - for (; o = n.pop();) try { - if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next); - if (o.d) { - var r = o.d.call(o.v); - if (o.a) return s |= 2, Promise.resolve(r).then(next, err); - } else s |= 1; - } catch (r) { - return err(r); - } - if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve(); - if (t !== e) throw t; - } - function err(n) { - return t = t !== e ? new r(n, t) : n, next(); - } - return next(); - } - }; -} -module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js b/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js deleted file mode 100644 index b818e2e..0000000 --- a/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +++ /dev/null @@ -1,69 +0,0 @@ -var OverloadYield = require("./OverloadYield.js"); -function _wrapAsyncGenerator(e) { - return function () { - return new AsyncGenerator(e.apply(this, arguments)); - }; -} -function AsyncGenerator(e) { - var r, t; - function resume(r, t) { - try { - var n = e[r](t), - o = n.value, - u = o instanceof OverloadYield; - Promise.resolve(u ? o.v : o).then(function (t) { - if (u) { - var i = "return" === r ? "return" : "next"; - if (!o.k || t.done) return resume(i, t); - t = e[i](t).value; - } - settle(n.done ? "return" : "normal", t); - }, function (e) { - resume("throw", e); - }); - } catch (e) { - settle("throw", e); - } - } - function settle(e, n) { - switch (e) { - case "return": - r.resolve({ - value: n, - done: !0 - }); - break; - case "throw": - r.reject(n); - break; - default: - r.resolve({ - value: n, - done: !1 - }); - } - (r = r.next) ? resume(r.key, r.arg) : t = null; - } - this._invoke = function (e, n) { - return new Promise(function (o, u) { - var i = { - key: e, - arg: n, - resolve: o, - reject: u, - next: null - }; - t ? t = t.next = i : (r = t = i, resume(e, n)); - }); - }, "function" != typeof e["return"] && (this["return"] = void 0); -} -AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { - return this; -}, AsyncGenerator.prototype.next = function (e) { - return this._invoke("next", e); -}, AsyncGenerator.prototype["throw"] = function (e) { - return this._invoke("throw", e); -}, AsyncGenerator.prototype["return"] = function (e) { - return this._invoke("return", e); -}; -module.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/wrapNativeSuper.js deleted file mode 100644 index acd87ab..0000000 --- a/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +++ /dev/null @@ -1,27 +0,0 @@ -var getPrototypeOf = require("./getPrototypeOf.js"); -var setPrototypeOf = require("./setPrototypeOf.js"); -var isNativeFunction = require("./isNativeFunction.js"); -var construct = require("./construct.js"); -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); -} -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/wrapRegExp.js b/node_modules/@babel/runtime/helpers/wrapRegExp.js deleted file mode 100644 index 3d6e6ce..0000000 --- a/node_modules/@babel/runtime/helpers/wrapRegExp.js +++ /dev/null @@ -1,52 +0,0 @@ -var _typeof = require("./typeof.js")["default"]; -var setPrototypeOf = require("./setPrototypeOf.js"); -var inherits = require("./inherits.js"); -function _wrapRegExp() { - module.exports = _wrapRegExp = function _wrapRegExp(e, r) { - return new BabelRegExp(e, void 0, r); - }, module.exports.__esModule = true, module.exports["default"] = module.exports; - var e = RegExp.prototype, - r = new WeakMap(); - function BabelRegExp(e, t, p) { - var o = RegExp(e, t); - return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); - } - function buildGroups(e, t) { - var p = r.get(t); - return Object.keys(p).reduce(function (r, t) { - var o = p[t]; - if ("number" == typeof o) r[t] = e[o];else { - for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; - r[t] = e[o[i]]; - } - return r; - }, Object.create(null)); - } - return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { - var t = e.exec.call(this, r); - if (t) { - t.groups = buildGroups(t, this); - var p = t.indices; - p && (p.groups = buildGroups(p, this)); - } - return t; - }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { - if ("string" == typeof p) { - var o = r.get(this); - return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { - if ("" === t) return e; - var p = o[r]; - return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; - })); - } - if ("function" == typeof p) { - var i = this; - return e[Symbol.replace].call(this, t, function () { - var e = arguments; - return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); - }); - } - return e[Symbol.replace].call(this, t, p); - }, _wrapRegExp.apply(this, arguments); -} -module.exports = _wrapRegExp, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/helpers/writeOnlyError.js b/node_modules/@babel/runtime/helpers/writeOnlyError.js deleted file mode 100644 index c98ee82..0000000 --- a/node_modules/@babel/runtime/helpers/writeOnlyError.js +++ /dev/null @@ -1,4 +0,0 @@ -function _writeOnlyError(r) { - throw new TypeError('"' + r + '" is write-only'); -} -module.exports = _writeOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file diff --git a/node_modules/@babel/runtime/package.json b/node_modules/@babel/runtime/package.json deleted file mode 100644 index 1a8098a..0000000 --- a/node_modules/@babel/runtime/package.json +++ /dev/null @@ -1,1107 +0,0 @@ -{ - "name": "@babel/runtime", - "version": "7.28.4", - "description": "babel's modular runtime helpers", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-runtime" - }, - "homepage": "https://babel.dev/docs/en/next/babel-runtime", - "author": "The Babel Team (https://babel.dev/team)", - "exports": { - "./helpers/OverloadYield": [ - { - "node": "./helpers/OverloadYield.js", - "import": "./helpers/esm/OverloadYield.js", - "default": "./helpers/OverloadYield.js" - }, - "./helpers/OverloadYield.js" - ], - "./helpers/esm/OverloadYield": "./helpers/esm/OverloadYield.js", - "./helpers/applyDecoratedDescriptor": [ - { - "node": "./helpers/applyDecoratedDescriptor.js", - "import": "./helpers/esm/applyDecoratedDescriptor.js", - "default": "./helpers/applyDecoratedDescriptor.js" - }, - "./helpers/applyDecoratedDescriptor.js" - ], - "./helpers/esm/applyDecoratedDescriptor": "./helpers/esm/applyDecoratedDescriptor.js", - "./helpers/applyDecs2311": [ - { - "node": "./helpers/applyDecs2311.js", - "import": "./helpers/esm/applyDecs2311.js", - "default": "./helpers/applyDecs2311.js" - }, - "./helpers/applyDecs2311.js" - ], - "./helpers/esm/applyDecs2311": "./helpers/esm/applyDecs2311.js", - "./helpers/arrayLikeToArray": [ - { - "node": "./helpers/arrayLikeToArray.js", - "import": "./helpers/esm/arrayLikeToArray.js", - "default": "./helpers/arrayLikeToArray.js" - }, - "./helpers/arrayLikeToArray.js" - ], - "./helpers/esm/arrayLikeToArray": "./helpers/esm/arrayLikeToArray.js", - "./helpers/arrayWithHoles": [ - { - "node": "./helpers/arrayWithHoles.js", - "import": "./helpers/esm/arrayWithHoles.js", - "default": "./helpers/arrayWithHoles.js" - }, - "./helpers/arrayWithHoles.js" - ], - "./helpers/esm/arrayWithHoles": "./helpers/esm/arrayWithHoles.js", - "./helpers/arrayWithoutHoles": [ - { - "node": "./helpers/arrayWithoutHoles.js", - "import": "./helpers/esm/arrayWithoutHoles.js", - "default": "./helpers/arrayWithoutHoles.js" - }, - "./helpers/arrayWithoutHoles.js" - ], - "./helpers/esm/arrayWithoutHoles": "./helpers/esm/arrayWithoutHoles.js", - "./helpers/assertClassBrand": [ - { - "node": "./helpers/assertClassBrand.js", - "import": "./helpers/esm/assertClassBrand.js", - "default": "./helpers/assertClassBrand.js" - }, - "./helpers/assertClassBrand.js" - ], - "./helpers/esm/assertClassBrand": "./helpers/esm/assertClassBrand.js", - "./helpers/assertThisInitialized": [ - { - "node": "./helpers/assertThisInitialized.js", - "import": "./helpers/esm/assertThisInitialized.js", - "default": "./helpers/assertThisInitialized.js" - }, - "./helpers/assertThisInitialized.js" - ], - "./helpers/esm/assertThisInitialized": "./helpers/esm/assertThisInitialized.js", - "./helpers/asyncGeneratorDelegate": [ - { - "node": "./helpers/asyncGeneratorDelegate.js", - "import": "./helpers/esm/asyncGeneratorDelegate.js", - "default": "./helpers/asyncGeneratorDelegate.js" - }, - "./helpers/asyncGeneratorDelegate.js" - ], - "./helpers/esm/asyncGeneratorDelegate": "./helpers/esm/asyncGeneratorDelegate.js", - "./helpers/asyncIterator": [ - { - "node": "./helpers/asyncIterator.js", - "import": "./helpers/esm/asyncIterator.js", - "default": "./helpers/asyncIterator.js" - }, - "./helpers/asyncIterator.js" - ], - "./helpers/esm/asyncIterator": "./helpers/esm/asyncIterator.js", - "./helpers/asyncToGenerator": [ - { - "node": "./helpers/asyncToGenerator.js", - "import": "./helpers/esm/asyncToGenerator.js", - "default": "./helpers/asyncToGenerator.js" - }, - "./helpers/asyncToGenerator.js" - ], - "./helpers/esm/asyncToGenerator": "./helpers/esm/asyncToGenerator.js", - "./helpers/awaitAsyncGenerator": [ - { - "node": "./helpers/awaitAsyncGenerator.js", - "import": "./helpers/esm/awaitAsyncGenerator.js", - "default": "./helpers/awaitAsyncGenerator.js" - }, - "./helpers/awaitAsyncGenerator.js" - ], - "./helpers/esm/awaitAsyncGenerator": "./helpers/esm/awaitAsyncGenerator.js", - "./helpers/callSuper": [ - { - "node": "./helpers/callSuper.js", - "import": "./helpers/esm/callSuper.js", - "default": "./helpers/callSuper.js" - }, - "./helpers/callSuper.js" - ], - "./helpers/esm/callSuper": "./helpers/esm/callSuper.js", - "./helpers/checkInRHS": [ - { - "node": "./helpers/checkInRHS.js", - "import": "./helpers/esm/checkInRHS.js", - "default": "./helpers/checkInRHS.js" - }, - "./helpers/checkInRHS.js" - ], - "./helpers/esm/checkInRHS": "./helpers/esm/checkInRHS.js", - "./helpers/checkPrivateRedeclaration": [ - { - "node": "./helpers/checkPrivateRedeclaration.js", - "import": "./helpers/esm/checkPrivateRedeclaration.js", - "default": "./helpers/checkPrivateRedeclaration.js" - }, - "./helpers/checkPrivateRedeclaration.js" - ], - "./helpers/esm/checkPrivateRedeclaration": "./helpers/esm/checkPrivateRedeclaration.js", - "./helpers/classCallCheck": [ - { - "node": "./helpers/classCallCheck.js", - "import": "./helpers/esm/classCallCheck.js", - "default": "./helpers/classCallCheck.js" - }, - "./helpers/classCallCheck.js" - ], - "./helpers/esm/classCallCheck": "./helpers/esm/classCallCheck.js", - "./helpers/classNameTDZError": [ - { - "node": "./helpers/classNameTDZError.js", - "import": "./helpers/esm/classNameTDZError.js", - "default": "./helpers/classNameTDZError.js" - }, - "./helpers/classNameTDZError.js" - ], - "./helpers/esm/classNameTDZError": "./helpers/esm/classNameTDZError.js", - "./helpers/classPrivateFieldGet2": [ - { - "node": "./helpers/classPrivateFieldGet2.js", - "import": "./helpers/esm/classPrivateFieldGet2.js", - "default": "./helpers/classPrivateFieldGet2.js" - }, - "./helpers/classPrivateFieldGet2.js" - ], - "./helpers/esm/classPrivateFieldGet2": "./helpers/esm/classPrivateFieldGet2.js", - "./helpers/classPrivateFieldInitSpec": [ - { - "node": "./helpers/classPrivateFieldInitSpec.js", - "import": "./helpers/esm/classPrivateFieldInitSpec.js", - "default": "./helpers/classPrivateFieldInitSpec.js" - }, - "./helpers/classPrivateFieldInitSpec.js" - ], - "./helpers/esm/classPrivateFieldInitSpec": "./helpers/esm/classPrivateFieldInitSpec.js", - "./helpers/classPrivateFieldLooseBase": [ - { - "node": "./helpers/classPrivateFieldLooseBase.js", - "import": "./helpers/esm/classPrivateFieldLooseBase.js", - "default": "./helpers/classPrivateFieldLooseBase.js" - }, - "./helpers/classPrivateFieldLooseBase.js" - ], - "./helpers/esm/classPrivateFieldLooseBase": "./helpers/esm/classPrivateFieldLooseBase.js", - "./helpers/classPrivateFieldLooseKey": [ - { - "node": "./helpers/classPrivateFieldLooseKey.js", - "import": "./helpers/esm/classPrivateFieldLooseKey.js", - "default": "./helpers/classPrivateFieldLooseKey.js" - }, - "./helpers/classPrivateFieldLooseKey.js" - ], - "./helpers/esm/classPrivateFieldLooseKey": "./helpers/esm/classPrivateFieldLooseKey.js", - "./helpers/classPrivateFieldSet2": [ - { - "node": "./helpers/classPrivateFieldSet2.js", - "import": "./helpers/esm/classPrivateFieldSet2.js", - "default": "./helpers/classPrivateFieldSet2.js" - }, - "./helpers/classPrivateFieldSet2.js" - ], - "./helpers/esm/classPrivateFieldSet2": "./helpers/esm/classPrivateFieldSet2.js", - "./helpers/classPrivateGetter": [ - { - "node": "./helpers/classPrivateGetter.js", - "import": "./helpers/esm/classPrivateGetter.js", - "default": "./helpers/classPrivateGetter.js" - }, - "./helpers/classPrivateGetter.js" - ], - "./helpers/esm/classPrivateGetter": "./helpers/esm/classPrivateGetter.js", - "./helpers/classPrivateMethodInitSpec": [ - { - "node": "./helpers/classPrivateMethodInitSpec.js", - "import": "./helpers/esm/classPrivateMethodInitSpec.js", - "default": "./helpers/classPrivateMethodInitSpec.js" - }, - "./helpers/classPrivateMethodInitSpec.js" - ], - "./helpers/esm/classPrivateMethodInitSpec": "./helpers/esm/classPrivateMethodInitSpec.js", - "./helpers/classPrivateSetter": [ - { - "node": "./helpers/classPrivateSetter.js", - "import": "./helpers/esm/classPrivateSetter.js", - "default": "./helpers/classPrivateSetter.js" - }, - "./helpers/classPrivateSetter.js" - ], - "./helpers/esm/classPrivateSetter": "./helpers/esm/classPrivateSetter.js", - "./helpers/classStaticPrivateMethodGet": [ - { - "node": "./helpers/classStaticPrivateMethodGet.js", - "import": "./helpers/esm/classStaticPrivateMethodGet.js", - "default": "./helpers/classStaticPrivateMethodGet.js" - }, - "./helpers/classStaticPrivateMethodGet.js" - ], - "./helpers/esm/classStaticPrivateMethodGet": "./helpers/esm/classStaticPrivateMethodGet.js", - "./helpers/construct": [ - { - "node": "./helpers/construct.js", - "import": "./helpers/esm/construct.js", - "default": "./helpers/construct.js" - }, - "./helpers/construct.js" - ], - "./helpers/esm/construct": "./helpers/esm/construct.js", - "./helpers/createClass": [ - { - "node": "./helpers/createClass.js", - "import": "./helpers/esm/createClass.js", - "default": "./helpers/createClass.js" - }, - "./helpers/createClass.js" - ], - "./helpers/esm/createClass": "./helpers/esm/createClass.js", - "./helpers/createForOfIteratorHelper": [ - { - "node": "./helpers/createForOfIteratorHelper.js", - "import": "./helpers/esm/createForOfIteratorHelper.js", - "default": "./helpers/createForOfIteratorHelper.js" - }, - "./helpers/createForOfIteratorHelper.js" - ], - "./helpers/esm/createForOfIteratorHelper": "./helpers/esm/createForOfIteratorHelper.js", - "./helpers/createForOfIteratorHelperLoose": [ - { - "node": "./helpers/createForOfIteratorHelperLoose.js", - "import": "./helpers/esm/createForOfIteratorHelperLoose.js", - "default": "./helpers/createForOfIteratorHelperLoose.js" - }, - "./helpers/createForOfIteratorHelperLoose.js" - ], - "./helpers/esm/createForOfIteratorHelperLoose": "./helpers/esm/createForOfIteratorHelperLoose.js", - "./helpers/createSuper": [ - { - "node": "./helpers/createSuper.js", - "import": "./helpers/esm/createSuper.js", - "default": "./helpers/createSuper.js" - }, - "./helpers/createSuper.js" - ], - "./helpers/esm/createSuper": "./helpers/esm/createSuper.js", - "./helpers/decorate": [ - { - "node": "./helpers/decorate.js", - "import": "./helpers/esm/decorate.js", - "default": "./helpers/decorate.js" - }, - "./helpers/decorate.js" - ], - "./helpers/esm/decorate": "./helpers/esm/decorate.js", - "./helpers/defaults": [ - { - "node": "./helpers/defaults.js", - "import": "./helpers/esm/defaults.js", - "default": "./helpers/defaults.js" - }, - "./helpers/defaults.js" - ], - "./helpers/esm/defaults": "./helpers/esm/defaults.js", - "./helpers/defineAccessor": [ - { - "node": "./helpers/defineAccessor.js", - "import": "./helpers/esm/defineAccessor.js", - "default": "./helpers/defineAccessor.js" - }, - "./helpers/defineAccessor.js" - ], - "./helpers/esm/defineAccessor": "./helpers/esm/defineAccessor.js", - "./helpers/defineProperty": [ - { - "node": "./helpers/defineProperty.js", - "import": "./helpers/esm/defineProperty.js", - "default": "./helpers/defineProperty.js" - }, - "./helpers/defineProperty.js" - ], - "./helpers/esm/defineProperty": "./helpers/esm/defineProperty.js", - "./helpers/extends": [ - { - "node": "./helpers/extends.js", - "import": "./helpers/esm/extends.js", - "default": "./helpers/extends.js" - }, - "./helpers/extends.js" - ], - "./helpers/esm/extends": "./helpers/esm/extends.js", - "./helpers/get": [ - { - "node": "./helpers/get.js", - "import": "./helpers/esm/get.js", - "default": "./helpers/get.js" - }, - "./helpers/get.js" - ], - "./helpers/esm/get": "./helpers/esm/get.js", - "./helpers/getPrototypeOf": [ - { - "node": "./helpers/getPrototypeOf.js", - "import": "./helpers/esm/getPrototypeOf.js", - "default": "./helpers/getPrototypeOf.js" - }, - "./helpers/getPrototypeOf.js" - ], - "./helpers/esm/getPrototypeOf": "./helpers/esm/getPrototypeOf.js", - "./helpers/identity": [ - { - "node": "./helpers/identity.js", - "import": "./helpers/esm/identity.js", - "default": "./helpers/identity.js" - }, - "./helpers/identity.js" - ], - "./helpers/esm/identity": "./helpers/esm/identity.js", - "./helpers/importDeferProxy": [ - { - "node": "./helpers/importDeferProxy.js", - "import": "./helpers/esm/importDeferProxy.js", - "default": "./helpers/importDeferProxy.js" - }, - "./helpers/importDeferProxy.js" - ], - "./helpers/esm/importDeferProxy": "./helpers/esm/importDeferProxy.js", - "./helpers/inherits": [ - { - "node": "./helpers/inherits.js", - "import": "./helpers/esm/inherits.js", - "default": "./helpers/inherits.js" - }, - "./helpers/inherits.js" - ], - "./helpers/esm/inherits": "./helpers/esm/inherits.js", - "./helpers/inheritsLoose": [ - { - "node": "./helpers/inheritsLoose.js", - "import": "./helpers/esm/inheritsLoose.js", - "default": "./helpers/inheritsLoose.js" - }, - "./helpers/inheritsLoose.js" - ], - "./helpers/esm/inheritsLoose": "./helpers/esm/inheritsLoose.js", - "./helpers/initializerDefineProperty": [ - { - "node": "./helpers/initializerDefineProperty.js", - "import": "./helpers/esm/initializerDefineProperty.js", - "default": "./helpers/initializerDefineProperty.js" - }, - "./helpers/initializerDefineProperty.js" - ], - "./helpers/esm/initializerDefineProperty": "./helpers/esm/initializerDefineProperty.js", - "./helpers/initializerWarningHelper": [ - { - "node": "./helpers/initializerWarningHelper.js", - "import": "./helpers/esm/initializerWarningHelper.js", - "default": "./helpers/initializerWarningHelper.js" - }, - "./helpers/initializerWarningHelper.js" - ], - "./helpers/esm/initializerWarningHelper": "./helpers/esm/initializerWarningHelper.js", - "./helpers/instanceof": [ - { - "node": "./helpers/instanceof.js", - "import": "./helpers/esm/instanceof.js", - "default": "./helpers/instanceof.js" - }, - "./helpers/instanceof.js" - ], - "./helpers/esm/instanceof": "./helpers/esm/instanceof.js", - "./helpers/interopRequireDefault": [ - { - "node": "./helpers/interopRequireDefault.js", - "import": "./helpers/esm/interopRequireDefault.js", - "default": "./helpers/interopRequireDefault.js" - }, - "./helpers/interopRequireDefault.js" - ], - "./helpers/esm/interopRequireDefault": "./helpers/esm/interopRequireDefault.js", - "./helpers/interopRequireWildcard": [ - { - "node": "./helpers/interopRequireWildcard.js", - "import": "./helpers/esm/interopRequireWildcard.js", - "default": "./helpers/interopRequireWildcard.js" - }, - "./helpers/interopRequireWildcard.js" - ], - "./helpers/esm/interopRequireWildcard": "./helpers/esm/interopRequireWildcard.js", - "./helpers/isNativeFunction": [ - { - "node": "./helpers/isNativeFunction.js", - "import": "./helpers/esm/isNativeFunction.js", - "default": "./helpers/isNativeFunction.js" - }, - "./helpers/isNativeFunction.js" - ], - "./helpers/esm/isNativeFunction": "./helpers/esm/isNativeFunction.js", - "./helpers/isNativeReflectConstruct": [ - { - "node": "./helpers/isNativeReflectConstruct.js", - "import": "./helpers/esm/isNativeReflectConstruct.js", - "default": "./helpers/isNativeReflectConstruct.js" - }, - "./helpers/isNativeReflectConstruct.js" - ], - "./helpers/esm/isNativeReflectConstruct": "./helpers/esm/isNativeReflectConstruct.js", - "./helpers/iterableToArray": [ - { - "node": "./helpers/iterableToArray.js", - "import": "./helpers/esm/iterableToArray.js", - "default": "./helpers/iterableToArray.js" - }, - "./helpers/iterableToArray.js" - ], - "./helpers/esm/iterableToArray": "./helpers/esm/iterableToArray.js", - "./helpers/iterableToArrayLimit": [ - { - "node": "./helpers/iterableToArrayLimit.js", - "import": "./helpers/esm/iterableToArrayLimit.js", - "default": "./helpers/iterableToArrayLimit.js" - }, - "./helpers/iterableToArrayLimit.js" - ], - "./helpers/esm/iterableToArrayLimit": "./helpers/esm/iterableToArrayLimit.js", - "./helpers/jsx": [ - { - "node": "./helpers/jsx.js", - "import": "./helpers/esm/jsx.js", - "default": "./helpers/jsx.js" - }, - "./helpers/jsx.js" - ], - "./helpers/esm/jsx": "./helpers/esm/jsx.js", - "./helpers/maybeArrayLike": [ - { - "node": "./helpers/maybeArrayLike.js", - "import": "./helpers/esm/maybeArrayLike.js", - "default": "./helpers/maybeArrayLike.js" - }, - "./helpers/maybeArrayLike.js" - ], - "./helpers/esm/maybeArrayLike": "./helpers/esm/maybeArrayLike.js", - "./helpers/newArrowCheck": [ - { - "node": "./helpers/newArrowCheck.js", - "import": "./helpers/esm/newArrowCheck.js", - "default": "./helpers/newArrowCheck.js" - }, - "./helpers/newArrowCheck.js" - ], - "./helpers/esm/newArrowCheck": "./helpers/esm/newArrowCheck.js", - "./helpers/nonIterableRest": [ - { - "node": "./helpers/nonIterableRest.js", - "import": "./helpers/esm/nonIterableRest.js", - "default": "./helpers/nonIterableRest.js" - }, - "./helpers/nonIterableRest.js" - ], - "./helpers/esm/nonIterableRest": "./helpers/esm/nonIterableRest.js", - "./helpers/nonIterableSpread": [ - { - "node": "./helpers/nonIterableSpread.js", - "import": "./helpers/esm/nonIterableSpread.js", - "default": "./helpers/nonIterableSpread.js" - }, - "./helpers/nonIterableSpread.js" - ], - "./helpers/esm/nonIterableSpread": "./helpers/esm/nonIterableSpread.js", - "./helpers/nullishReceiverError": [ - { - "node": "./helpers/nullishReceiverError.js", - "import": "./helpers/esm/nullishReceiverError.js", - "default": "./helpers/nullishReceiverError.js" - }, - "./helpers/nullishReceiverError.js" - ], - "./helpers/esm/nullishReceiverError": "./helpers/esm/nullishReceiverError.js", - "./helpers/objectDestructuringEmpty": [ - { - "node": "./helpers/objectDestructuringEmpty.js", - "import": "./helpers/esm/objectDestructuringEmpty.js", - "default": "./helpers/objectDestructuringEmpty.js" - }, - "./helpers/objectDestructuringEmpty.js" - ], - "./helpers/esm/objectDestructuringEmpty": "./helpers/esm/objectDestructuringEmpty.js", - "./helpers/objectSpread2": [ - { - "node": "./helpers/objectSpread2.js", - "import": "./helpers/esm/objectSpread2.js", - "default": "./helpers/objectSpread2.js" - }, - "./helpers/objectSpread2.js" - ], - "./helpers/esm/objectSpread2": "./helpers/esm/objectSpread2.js", - "./helpers/objectWithoutProperties": [ - { - "node": "./helpers/objectWithoutProperties.js", - "import": "./helpers/esm/objectWithoutProperties.js", - "default": "./helpers/objectWithoutProperties.js" - }, - "./helpers/objectWithoutProperties.js" - ], - "./helpers/esm/objectWithoutProperties": "./helpers/esm/objectWithoutProperties.js", - "./helpers/objectWithoutPropertiesLoose": [ - { - "node": "./helpers/objectWithoutPropertiesLoose.js", - "import": "./helpers/esm/objectWithoutPropertiesLoose.js", - "default": "./helpers/objectWithoutPropertiesLoose.js" - }, - "./helpers/objectWithoutPropertiesLoose.js" - ], - "./helpers/esm/objectWithoutPropertiesLoose": "./helpers/esm/objectWithoutPropertiesLoose.js", - "./helpers/possibleConstructorReturn": [ - { - "node": "./helpers/possibleConstructorReturn.js", - "import": "./helpers/esm/possibleConstructorReturn.js", - "default": "./helpers/possibleConstructorReturn.js" - }, - "./helpers/possibleConstructorReturn.js" - ], - "./helpers/esm/possibleConstructorReturn": "./helpers/esm/possibleConstructorReturn.js", - "./helpers/readOnlyError": [ - { - "node": "./helpers/readOnlyError.js", - "import": "./helpers/esm/readOnlyError.js", - "default": "./helpers/readOnlyError.js" - }, - "./helpers/readOnlyError.js" - ], - "./helpers/esm/readOnlyError": "./helpers/esm/readOnlyError.js", - "./helpers/regenerator": [ - { - "node": "./helpers/regenerator.js", - "import": "./helpers/esm/regenerator.js", - "default": "./helpers/regenerator.js" - }, - "./helpers/regenerator.js" - ], - "./helpers/esm/regenerator": "./helpers/esm/regenerator.js", - "./helpers/regeneratorAsync": [ - { - "node": "./helpers/regeneratorAsync.js", - "import": "./helpers/esm/regeneratorAsync.js", - "default": "./helpers/regeneratorAsync.js" - }, - "./helpers/regeneratorAsync.js" - ], - "./helpers/esm/regeneratorAsync": "./helpers/esm/regeneratorAsync.js", - "./helpers/regeneratorAsyncGen": [ - { - "node": "./helpers/regeneratorAsyncGen.js", - "import": "./helpers/esm/regeneratorAsyncGen.js", - "default": "./helpers/regeneratorAsyncGen.js" - }, - "./helpers/regeneratorAsyncGen.js" - ], - "./helpers/esm/regeneratorAsyncGen": "./helpers/esm/regeneratorAsyncGen.js", - "./helpers/regeneratorKeys": [ - { - "node": "./helpers/regeneratorKeys.js", - "import": "./helpers/esm/regeneratorKeys.js", - "default": "./helpers/regeneratorKeys.js" - }, - "./helpers/regeneratorKeys.js" - ], - "./helpers/esm/regeneratorKeys": "./helpers/esm/regeneratorKeys.js", - "./helpers/regeneratorValues": [ - { - "node": "./helpers/regeneratorValues.js", - "import": "./helpers/esm/regeneratorValues.js", - "default": "./helpers/regeneratorValues.js" - }, - "./helpers/regeneratorValues.js" - ], - "./helpers/esm/regeneratorValues": "./helpers/esm/regeneratorValues.js", - "./helpers/set": [ - { - "node": "./helpers/set.js", - "import": "./helpers/esm/set.js", - "default": "./helpers/set.js" - }, - "./helpers/set.js" - ], - "./helpers/esm/set": "./helpers/esm/set.js", - "./helpers/setFunctionName": [ - { - "node": "./helpers/setFunctionName.js", - "import": "./helpers/esm/setFunctionName.js", - "default": "./helpers/setFunctionName.js" - }, - "./helpers/setFunctionName.js" - ], - "./helpers/esm/setFunctionName": "./helpers/esm/setFunctionName.js", - "./helpers/setPrototypeOf": [ - { - "node": "./helpers/setPrototypeOf.js", - "import": "./helpers/esm/setPrototypeOf.js", - "default": "./helpers/setPrototypeOf.js" - }, - "./helpers/setPrototypeOf.js" - ], - "./helpers/esm/setPrototypeOf": "./helpers/esm/setPrototypeOf.js", - "./helpers/skipFirstGeneratorNext": [ - { - "node": "./helpers/skipFirstGeneratorNext.js", - "import": "./helpers/esm/skipFirstGeneratorNext.js", - "default": "./helpers/skipFirstGeneratorNext.js" - }, - "./helpers/skipFirstGeneratorNext.js" - ], - "./helpers/esm/skipFirstGeneratorNext": "./helpers/esm/skipFirstGeneratorNext.js", - "./helpers/slicedToArray": [ - { - "node": "./helpers/slicedToArray.js", - "import": "./helpers/esm/slicedToArray.js", - "default": "./helpers/slicedToArray.js" - }, - "./helpers/slicedToArray.js" - ], - "./helpers/esm/slicedToArray": "./helpers/esm/slicedToArray.js", - "./helpers/superPropBase": [ - { - "node": "./helpers/superPropBase.js", - "import": "./helpers/esm/superPropBase.js", - "default": "./helpers/superPropBase.js" - }, - "./helpers/superPropBase.js" - ], - "./helpers/esm/superPropBase": "./helpers/esm/superPropBase.js", - "./helpers/superPropGet": [ - { - "node": "./helpers/superPropGet.js", - "import": "./helpers/esm/superPropGet.js", - "default": "./helpers/superPropGet.js" - }, - "./helpers/superPropGet.js" - ], - "./helpers/esm/superPropGet": "./helpers/esm/superPropGet.js", - "./helpers/superPropSet": [ - { - "node": "./helpers/superPropSet.js", - "import": "./helpers/esm/superPropSet.js", - "default": "./helpers/superPropSet.js" - }, - "./helpers/superPropSet.js" - ], - "./helpers/esm/superPropSet": "./helpers/esm/superPropSet.js", - "./helpers/taggedTemplateLiteral": [ - { - "node": "./helpers/taggedTemplateLiteral.js", - "import": "./helpers/esm/taggedTemplateLiteral.js", - "default": "./helpers/taggedTemplateLiteral.js" - }, - "./helpers/taggedTemplateLiteral.js" - ], - "./helpers/esm/taggedTemplateLiteral": "./helpers/esm/taggedTemplateLiteral.js", - "./helpers/taggedTemplateLiteralLoose": [ - { - "node": "./helpers/taggedTemplateLiteralLoose.js", - "import": "./helpers/esm/taggedTemplateLiteralLoose.js", - "default": "./helpers/taggedTemplateLiteralLoose.js" - }, - "./helpers/taggedTemplateLiteralLoose.js" - ], - "./helpers/esm/taggedTemplateLiteralLoose": "./helpers/esm/taggedTemplateLiteralLoose.js", - "./helpers/tdz": [ - { - "node": "./helpers/tdz.js", - "import": "./helpers/esm/tdz.js", - "default": "./helpers/tdz.js" - }, - "./helpers/tdz.js" - ], - "./helpers/esm/tdz": "./helpers/esm/tdz.js", - "./helpers/temporalRef": [ - { - "node": "./helpers/temporalRef.js", - "import": "./helpers/esm/temporalRef.js", - "default": "./helpers/temporalRef.js" - }, - "./helpers/temporalRef.js" - ], - "./helpers/esm/temporalRef": "./helpers/esm/temporalRef.js", - "./helpers/temporalUndefined": [ - { - "node": "./helpers/temporalUndefined.js", - "import": "./helpers/esm/temporalUndefined.js", - "default": "./helpers/temporalUndefined.js" - }, - "./helpers/temporalUndefined.js" - ], - "./helpers/esm/temporalUndefined": "./helpers/esm/temporalUndefined.js", - "./helpers/toArray": [ - { - "node": "./helpers/toArray.js", - "import": "./helpers/esm/toArray.js", - "default": "./helpers/toArray.js" - }, - "./helpers/toArray.js" - ], - "./helpers/esm/toArray": "./helpers/esm/toArray.js", - "./helpers/toConsumableArray": [ - { - "node": "./helpers/toConsumableArray.js", - "import": "./helpers/esm/toConsumableArray.js", - "default": "./helpers/toConsumableArray.js" - }, - "./helpers/toConsumableArray.js" - ], - "./helpers/esm/toConsumableArray": "./helpers/esm/toConsumableArray.js", - "./helpers/toPrimitive": [ - { - "node": "./helpers/toPrimitive.js", - "import": "./helpers/esm/toPrimitive.js", - "default": "./helpers/toPrimitive.js" - }, - "./helpers/toPrimitive.js" - ], - "./helpers/esm/toPrimitive": "./helpers/esm/toPrimitive.js", - "./helpers/toPropertyKey": [ - { - "node": "./helpers/toPropertyKey.js", - "import": "./helpers/esm/toPropertyKey.js", - "default": "./helpers/toPropertyKey.js" - }, - "./helpers/toPropertyKey.js" - ], - "./helpers/esm/toPropertyKey": "./helpers/esm/toPropertyKey.js", - "./helpers/toSetter": [ - { - "node": "./helpers/toSetter.js", - "import": "./helpers/esm/toSetter.js", - "default": "./helpers/toSetter.js" - }, - "./helpers/toSetter.js" - ], - "./helpers/esm/toSetter": "./helpers/esm/toSetter.js", - "./helpers/tsRewriteRelativeImportExtensions": [ - { - "node": "./helpers/tsRewriteRelativeImportExtensions.js", - "import": "./helpers/esm/tsRewriteRelativeImportExtensions.js", - "default": "./helpers/tsRewriteRelativeImportExtensions.js" - }, - "./helpers/tsRewriteRelativeImportExtensions.js" - ], - "./helpers/esm/tsRewriteRelativeImportExtensions": "./helpers/esm/tsRewriteRelativeImportExtensions.js", - "./helpers/typeof": [ - { - "node": "./helpers/typeof.js", - "import": "./helpers/esm/typeof.js", - "default": "./helpers/typeof.js" - }, - "./helpers/typeof.js" - ], - "./helpers/esm/typeof": "./helpers/esm/typeof.js", - "./helpers/unsupportedIterableToArray": [ - { - "node": "./helpers/unsupportedIterableToArray.js", - "import": "./helpers/esm/unsupportedIterableToArray.js", - "default": "./helpers/unsupportedIterableToArray.js" - }, - "./helpers/unsupportedIterableToArray.js" - ], - "./helpers/esm/unsupportedIterableToArray": "./helpers/esm/unsupportedIterableToArray.js", - "./helpers/usingCtx": [ - { - "node": "./helpers/usingCtx.js", - "import": "./helpers/esm/usingCtx.js", - "default": "./helpers/usingCtx.js" - }, - "./helpers/usingCtx.js" - ], - "./helpers/esm/usingCtx": "./helpers/esm/usingCtx.js", - "./helpers/wrapAsyncGenerator": [ - { - "node": "./helpers/wrapAsyncGenerator.js", - "import": "./helpers/esm/wrapAsyncGenerator.js", - "default": "./helpers/wrapAsyncGenerator.js" - }, - "./helpers/wrapAsyncGenerator.js" - ], - "./helpers/esm/wrapAsyncGenerator": "./helpers/esm/wrapAsyncGenerator.js", - "./helpers/wrapNativeSuper": [ - { - "node": "./helpers/wrapNativeSuper.js", - "import": "./helpers/esm/wrapNativeSuper.js", - "default": "./helpers/wrapNativeSuper.js" - }, - "./helpers/wrapNativeSuper.js" - ], - "./helpers/esm/wrapNativeSuper": "./helpers/esm/wrapNativeSuper.js", - "./helpers/wrapRegExp": [ - { - "node": "./helpers/wrapRegExp.js", - "import": "./helpers/esm/wrapRegExp.js", - "default": "./helpers/wrapRegExp.js" - }, - "./helpers/wrapRegExp.js" - ], - "./helpers/esm/wrapRegExp": "./helpers/esm/wrapRegExp.js", - "./helpers/writeOnlyError": [ - { - "node": "./helpers/writeOnlyError.js", - "import": "./helpers/esm/writeOnlyError.js", - "default": "./helpers/writeOnlyError.js" - }, - "./helpers/writeOnlyError.js" - ], - "./helpers/esm/writeOnlyError": "./helpers/esm/writeOnlyError.js", - "./helpers/AwaitValue": [ - { - "node": "./helpers/AwaitValue.js", - "import": "./helpers/esm/AwaitValue.js", - "default": "./helpers/AwaitValue.js" - }, - "./helpers/AwaitValue.js" - ], - "./helpers/esm/AwaitValue": "./helpers/esm/AwaitValue.js", - "./helpers/applyDecs": [ - { - "node": "./helpers/applyDecs.js", - "import": "./helpers/esm/applyDecs.js", - "default": "./helpers/applyDecs.js" - }, - "./helpers/applyDecs.js" - ], - "./helpers/esm/applyDecs": "./helpers/esm/applyDecs.js", - "./helpers/applyDecs2203": [ - { - "node": "./helpers/applyDecs2203.js", - "import": "./helpers/esm/applyDecs2203.js", - "default": "./helpers/applyDecs2203.js" - }, - "./helpers/applyDecs2203.js" - ], - "./helpers/esm/applyDecs2203": "./helpers/esm/applyDecs2203.js", - "./helpers/applyDecs2203R": [ - { - "node": "./helpers/applyDecs2203R.js", - "import": "./helpers/esm/applyDecs2203R.js", - "default": "./helpers/applyDecs2203R.js" - }, - "./helpers/applyDecs2203R.js" - ], - "./helpers/esm/applyDecs2203R": "./helpers/esm/applyDecs2203R.js", - "./helpers/applyDecs2301": [ - { - "node": "./helpers/applyDecs2301.js", - "import": "./helpers/esm/applyDecs2301.js", - "default": "./helpers/applyDecs2301.js" - }, - "./helpers/applyDecs2301.js" - ], - "./helpers/esm/applyDecs2301": "./helpers/esm/applyDecs2301.js", - "./helpers/applyDecs2305": [ - { - "node": "./helpers/applyDecs2305.js", - "import": "./helpers/esm/applyDecs2305.js", - "default": "./helpers/applyDecs2305.js" - }, - "./helpers/applyDecs2305.js" - ], - "./helpers/esm/applyDecs2305": "./helpers/esm/applyDecs2305.js", - "./helpers/classApplyDescriptorDestructureSet": [ - { - "node": "./helpers/classApplyDescriptorDestructureSet.js", - "import": "./helpers/esm/classApplyDescriptorDestructureSet.js", - "default": "./helpers/classApplyDescriptorDestructureSet.js" - }, - "./helpers/classApplyDescriptorDestructureSet.js" - ], - "./helpers/esm/classApplyDescriptorDestructureSet": "./helpers/esm/classApplyDescriptorDestructureSet.js", - "./helpers/classApplyDescriptorGet": [ - { - "node": "./helpers/classApplyDescriptorGet.js", - "import": "./helpers/esm/classApplyDescriptorGet.js", - "default": "./helpers/classApplyDescriptorGet.js" - }, - "./helpers/classApplyDescriptorGet.js" - ], - "./helpers/esm/classApplyDescriptorGet": "./helpers/esm/classApplyDescriptorGet.js", - "./helpers/classApplyDescriptorSet": [ - { - "node": "./helpers/classApplyDescriptorSet.js", - "import": "./helpers/esm/classApplyDescriptorSet.js", - "default": "./helpers/classApplyDescriptorSet.js" - }, - "./helpers/classApplyDescriptorSet.js" - ], - "./helpers/esm/classApplyDescriptorSet": "./helpers/esm/classApplyDescriptorSet.js", - "./helpers/classCheckPrivateStaticAccess": [ - { - "node": "./helpers/classCheckPrivateStaticAccess.js", - "import": "./helpers/esm/classCheckPrivateStaticAccess.js", - "default": "./helpers/classCheckPrivateStaticAccess.js" - }, - "./helpers/classCheckPrivateStaticAccess.js" - ], - "./helpers/esm/classCheckPrivateStaticAccess": "./helpers/esm/classCheckPrivateStaticAccess.js", - "./helpers/classCheckPrivateStaticFieldDescriptor": [ - { - "node": "./helpers/classCheckPrivateStaticFieldDescriptor.js", - "import": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", - "default": "./helpers/classCheckPrivateStaticFieldDescriptor.js" - }, - "./helpers/classCheckPrivateStaticFieldDescriptor.js" - ], - "./helpers/esm/classCheckPrivateStaticFieldDescriptor": "./helpers/esm/classCheckPrivateStaticFieldDescriptor.js", - "./helpers/classExtractFieldDescriptor": [ - { - "node": "./helpers/classExtractFieldDescriptor.js", - "import": "./helpers/esm/classExtractFieldDescriptor.js", - "default": "./helpers/classExtractFieldDescriptor.js" - }, - "./helpers/classExtractFieldDescriptor.js" - ], - "./helpers/esm/classExtractFieldDescriptor": "./helpers/esm/classExtractFieldDescriptor.js", - "./helpers/classPrivateFieldDestructureSet": [ - { - "node": "./helpers/classPrivateFieldDestructureSet.js", - "import": "./helpers/esm/classPrivateFieldDestructureSet.js", - "default": "./helpers/classPrivateFieldDestructureSet.js" - }, - "./helpers/classPrivateFieldDestructureSet.js" - ], - "./helpers/esm/classPrivateFieldDestructureSet": "./helpers/esm/classPrivateFieldDestructureSet.js", - "./helpers/classPrivateFieldGet": [ - { - "node": "./helpers/classPrivateFieldGet.js", - "import": "./helpers/esm/classPrivateFieldGet.js", - "default": "./helpers/classPrivateFieldGet.js" - }, - "./helpers/classPrivateFieldGet.js" - ], - "./helpers/esm/classPrivateFieldGet": "./helpers/esm/classPrivateFieldGet.js", - "./helpers/classPrivateFieldSet": [ - { - "node": "./helpers/classPrivateFieldSet.js", - "import": "./helpers/esm/classPrivateFieldSet.js", - "default": "./helpers/classPrivateFieldSet.js" - }, - "./helpers/classPrivateFieldSet.js" - ], - "./helpers/esm/classPrivateFieldSet": "./helpers/esm/classPrivateFieldSet.js", - "./helpers/classPrivateMethodGet": [ - { - "node": "./helpers/classPrivateMethodGet.js", - "import": "./helpers/esm/classPrivateMethodGet.js", - "default": "./helpers/classPrivateMethodGet.js" - }, - "./helpers/classPrivateMethodGet.js" - ], - "./helpers/esm/classPrivateMethodGet": "./helpers/esm/classPrivateMethodGet.js", - "./helpers/classPrivateMethodSet": [ - { - "node": "./helpers/classPrivateMethodSet.js", - "import": "./helpers/esm/classPrivateMethodSet.js", - "default": "./helpers/classPrivateMethodSet.js" - }, - "./helpers/classPrivateMethodSet.js" - ], - "./helpers/esm/classPrivateMethodSet": "./helpers/esm/classPrivateMethodSet.js", - "./helpers/classStaticPrivateFieldDestructureSet": [ - { - "node": "./helpers/classStaticPrivateFieldDestructureSet.js", - "import": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", - "default": "./helpers/classStaticPrivateFieldDestructureSet.js" - }, - "./helpers/classStaticPrivateFieldDestructureSet.js" - ], - "./helpers/esm/classStaticPrivateFieldDestructureSet": "./helpers/esm/classStaticPrivateFieldDestructureSet.js", - "./helpers/classStaticPrivateFieldSpecGet": [ - { - "node": "./helpers/classStaticPrivateFieldSpecGet.js", - "import": "./helpers/esm/classStaticPrivateFieldSpecGet.js", - "default": "./helpers/classStaticPrivateFieldSpecGet.js" - }, - "./helpers/classStaticPrivateFieldSpecGet.js" - ], - "./helpers/esm/classStaticPrivateFieldSpecGet": "./helpers/esm/classStaticPrivateFieldSpecGet.js", - "./helpers/classStaticPrivateFieldSpecSet": [ - { - "node": "./helpers/classStaticPrivateFieldSpecSet.js", - "import": "./helpers/esm/classStaticPrivateFieldSpecSet.js", - "default": "./helpers/classStaticPrivateFieldSpecSet.js" - }, - "./helpers/classStaticPrivateFieldSpecSet.js" - ], - "./helpers/esm/classStaticPrivateFieldSpecSet": "./helpers/esm/classStaticPrivateFieldSpecSet.js", - "./helpers/classStaticPrivateMethodSet": [ - { - "node": "./helpers/classStaticPrivateMethodSet.js", - "import": "./helpers/esm/classStaticPrivateMethodSet.js", - "default": "./helpers/classStaticPrivateMethodSet.js" - }, - "./helpers/classStaticPrivateMethodSet.js" - ], - "./helpers/esm/classStaticPrivateMethodSet": "./helpers/esm/classStaticPrivateMethodSet.js", - "./helpers/defineEnumerableProperties": [ - { - "node": "./helpers/defineEnumerableProperties.js", - "import": "./helpers/esm/defineEnumerableProperties.js", - "default": "./helpers/defineEnumerableProperties.js" - }, - "./helpers/defineEnumerableProperties.js" - ], - "./helpers/esm/defineEnumerableProperties": "./helpers/esm/defineEnumerableProperties.js", - "./helpers/dispose": [ - { - "node": "./helpers/dispose.js", - "import": "./helpers/esm/dispose.js", - "default": "./helpers/dispose.js" - }, - "./helpers/dispose.js" - ], - "./helpers/esm/dispose": "./helpers/esm/dispose.js", - "./helpers/objectSpread": [ - { - "node": "./helpers/objectSpread.js", - "import": "./helpers/esm/objectSpread.js", - "default": "./helpers/objectSpread.js" - }, - "./helpers/objectSpread.js" - ], - "./helpers/esm/objectSpread": "./helpers/esm/objectSpread.js", - "./helpers/regeneratorRuntime": [ - { - "node": "./helpers/regeneratorRuntime.js", - "import": "./helpers/esm/regeneratorRuntime.js", - "default": "./helpers/regeneratorRuntime.js" - }, - "./helpers/regeneratorRuntime.js" - ], - "./helpers/esm/regeneratorRuntime": "./helpers/esm/regeneratorRuntime.js", - "./helpers/using": [ - { - "node": "./helpers/using.js", - "import": "./helpers/esm/using.js", - "default": "./helpers/using.js" - }, - "./helpers/using.js" - ], - "./helpers/esm/using": "./helpers/esm/using.js", - "./package": "./package.json", - "./package.json": "./package.json", - "./regenerator": "./regenerator/index.js", - "./regenerator/*.js": "./regenerator/*.js", - "./regenerator/": "./regenerator/" - }, - "engines": { - "node": ">=6.9.0" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/runtime/regenerator/index.js b/node_modules/@babel/runtime/regenerator/index.js deleted file mode 100644 index 5881357..0000000 --- a/node_modules/@babel/runtime/regenerator/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(Babel 8): Remove this file. - -var runtime = require("../helpers/regeneratorRuntime")(); -module.exports = runtime; - -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); - } -} diff --git a/node_modules/@esbuild/darwin-arm64/README.md b/node_modules/@esbuild/darwin-arm64/README.md deleted file mode 100644 index c2c0398..0000000 --- a/node_modules/@esbuild/darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# esbuild - -This is the macOS ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/darwin-arm64/bin/esbuild b/node_modules/@esbuild/darwin-arm64/bin/esbuild deleted file mode 100755 index e81b7da..0000000 Binary files a/node_modules/@esbuild/darwin-arm64/bin/esbuild and /dev/null differ diff --git a/node_modules/@esbuild/darwin-arm64/package.json b/node_modules/@esbuild/darwin-arm64/package.json deleted file mode 100644 index 6eea7ea..0000000 --- a/node_modules/@esbuild/darwin-arm64/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@esbuild/darwin-arm64", - "version": "0.21.5", - "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, - "license": "MIT", - "preferUnplugged": true, - "engines": { - "node": ">=12" - }, - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ] -} diff --git a/node_modules/@rollup/rollup-darwin-arm64/README.md b/node_modules/@rollup/rollup-darwin-arm64/README.md deleted file mode 100644 index c29619c..0000000 --- a/node_modules/@rollup/rollup-darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@rollup/rollup-darwin-arm64` - -This is the **aarch64-apple-darwin** binary for `rollup` diff --git a/node_modules/@rollup/rollup-darwin-arm64/package.json b/node_modules/@rollup/rollup-darwin-arm64/package.json deleted file mode 100644 index d95f2fb..0000000 --- a/node_modules/@rollup/rollup-darwin-arm64/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@rollup/rollup-darwin-arm64", - "version": "4.52.3", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "files": [ - "rollup.darwin-arm64.node" - ], - "description": "Native bindings for Rollup", - "author": "Lukas Taegert-Atkinson", - "homepage": "https://rollupjs.org/", - "license": "MIT", - "repository": "rollup/rollup", - "main": "./rollup.darwin-arm64.node" -} \ No newline at end of file diff --git a/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node b/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node deleted file mode 100644 index 86b5e75..0000000 Binary files a/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node and /dev/null differ diff --git a/node_modules/@types/estree/LICENSE b/node_modules/@types/estree/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/estree/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md deleted file mode 100644 index 2af760b..0000000 --- a/node_modules/@types/estree/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for estree (https://github.com/estree/estree). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. - -### Additional Details - * Last updated: Fri, 06 Jun 2025 00:04:33 GMT - * Dependencies: none - -# Credits -These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/node_modules/@types/estree/flow.d.ts b/node_modules/@types/estree/flow.d.ts deleted file mode 100644 index 9d001a9..0000000 --- a/node_modules/@types/estree/flow.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -declare namespace ESTree { - interface FlowTypeAnnotation extends Node {} - - interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} - - interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} - - interface FlowDeclaration extends Declaration {} - - interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ArrayTypeAnnotation extends FlowTypeAnnotation { - elementType: FlowTypeAnnotation; - } - - interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ClassImplements extends Node { - id: Identifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface ClassProperty { - key: Expression; - value?: Expression | null; - typeAnnotation?: TypeAnnotation | null; - computed: boolean; - static: boolean; - } - - interface DeclareClass extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - extends: InterfaceExtends[]; - } - - interface DeclareFunction extends FlowDeclaration { - id: Identifier; - } - - interface DeclareModule extends FlowDeclaration { - id: Literal | Identifier; - body: BlockStatement; - } - - interface DeclareVariable extends FlowDeclaration { - id: Identifier; - } - - interface FunctionTypeAnnotation extends FlowTypeAnnotation { - params: FunctionTypeParam[]; - returnType: FlowTypeAnnotation; - rest?: FunctionTypeParam | null; - typeParameters?: TypeParameterDeclaration | null; - } - - interface FunctionTypeParam { - name: Identifier; - typeAnnotation: FlowTypeAnnotation; - optional: boolean; - } - - interface GenericTypeAnnotation extends FlowTypeAnnotation { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceExtends extends Node { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceDeclaration extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; - } - - interface IntersectionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface NullableTypeAnnotation extends FlowTypeAnnotation { - typeAnnotation: TypeAnnotation; - } - - interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface TupleTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface TypeofTypeAnnotation extends FlowTypeAnnotation { - argument: FlowTypeAnnotation; - } - - interface TypeAlias extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - right: FlowTypeAnnotation; - } - - interface TypeAnnotation extends Node { - typeAnnotation: FlowTypeAnnotation; - } - - interface TypeCastExpression extends Expression { - expression: Expression; - typeAnnotation: TypeAnnotation; - } - - interface TypeParameterDeclaration extends Node { - params: Identifier[]; - } - - interface TypeParameterInstantiation extends Node { - params: FlowTypeAnnotation[]; - } - - interface ObjectTypeAnnotation extends FlowTypeAnnotation { - properties: ObjectTypeProperty[]; - indexers: ObjectTypeIndexer[]; - callProperties: ObjectTypeCallProperty[]; - } - - interface ObjectTypeCallProperty extends Node { - value: FunctionTypeAnnotation; - static: boolean; - } - - interface ObjectTypeIndexer extends Node { - id: Identifier; - key: FlowTypeAnnotation; - value: FlowTypeAnnotation; - static: boolean; - } - - interface ObjectTypeProperty extends Node { - key: Expression; - value: FlowTypeAnnotation; - optional: boolean; - static: boolean; - } - - interface QualifiedTypeIdentifier extends Node { - qualification: Identifier | QualifiedTypeIdentifier; - id: Identifier; - } - - interface UnionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} -} diff --git a/node_modules/@types/estree/index.d.ts b/node_modules/@types/estree/index.d.ts deleted file mode 100644 index 2bc66fb..0000000 --- a/node_modules/@types/estree/index.d.ts +++ /dev/null @@ -1,694 +0,0 @@ -// This definition file follows a somewhat unusual format. ESTree allows -// runtime type checks based on the `type` parameter. In order to explain this -// to typescript we want to use discriminated union types: -// https://github.com/Microsoft/TypeScript/pull/9163 -// -// For ESTree this is a bit tricky because the high level interfaces like -// Node or Function are pulling double duty. We want to pass common fields down -// to the interfaces that extend them (like Identifier or -// ArrowFunctionExpression), but you can't extend a type union or enforce -// common fields on them. So we've split the high level interfaces into two -// types, a base type which passes down inherited fields, and a type union of -// all types which extend the base type. Only the type union is exported, and -// the union is how other types refer to the collection of inheriting types. -// -// This makes the definitions file here somewhat more difficult to maintain, -// but it has the notable advantage of making ESTree much easier to use as -// an end user. - -export interface BaseNodeWithoutComments { - // Every leaf interface that extends BaseNode must specify a type property. - // The type property should be a string literal. For example, Identifier - // has: `type: "Identifier"` - type: string; - loc?: SourceLocation | null | undefined; - range?: [number, number] | undefined; -} - -export interface BaseNode extends BaseNodeWithoutComments { - leadingComments?: Comment[] | undefined; - trailingComments?: Comment[] | undefined; -} - -export interface NodeMap { - AssignmentProperty: AssignmentProperty; - CatchClause: CatchClause; - Class: Class; - ClassBody: ClassBody; - Expression: Expression; - Function: Function; - Identifier: Identifier; - Literal: Literal; - MethodDefinition: MethodDefinition; - ModuleDeclaration: ModuleDeclaration; - ModuleSpecifier: ModuleSpecifier; - Pattern: Pattern; - PrivateIdentifier: PrivateIdentifier; - Program: Program; - Property: Property; - PropertyDefinition: PropertyDefinition; - SpreadElement: SpreadElement; - Statement: Statement; - Super: Super; - SwitchCase: SwitchCase; - TemplateElement: TemplateElement; - VariableDeclarator: VariableDeclarator; -} - -export type Node = NodeMap[keyof NodeMap]; - -export interface Comment extends BaseNodeWithoutComments { - type: "Line" | "Block"; - value: string; -} - -export interface SourceLocation { - source?: string | null | undefined; - start: Position; - end: Position; -} - -export interface Position { - /** >= 1 */ - line: number; - /** >= 0 */ - column: number; -} - -export interface Program extends BaseNode { - type: "Program"; - sourceType: "script" | "module"; - body: Array; - comments?: Comment[] | undefined; -} - -export interface Directive extends BaseNode { - type: "ExpressionStatement"; - expression: Literal; - directive: string; -} - -export interface BaseFunction extends BaseNode { - params: Pattern[]; - generator?: boolean | undefined; - async?: boolean | undefined; - // The body is either BlockStatement or Expression because arrow functions - // can have a body that's either. FunctionDeclarations and - // FunctionExpressions have only BlockStatement bodies. - body: BlockStatement | Expression; -} - -export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; - -export type Statement = - | ExpressionStatement - | BlockStatement - | StaticBlock - | EmptyStatement - | DebuggerStatement - | WithStatement - | ReturnStatement - | LabeledStatement - | BreakStatement - | ContinueStatement - | IfStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | WhileStatement - | DoWhileStatement - | ForStatement - | ForInStatement - | ForOfStatement - | Declaration; - -export interface BaseStatement extends BaseNode {} - -export interface EmptyStatement extends BaseStatement { - type: "EmptyStatement"; -} - -export interface BlockStatement extends BaseStatement { - type: "BlockStatement"; - body: Statement[]; - innerComments?: Comment[] | undefined; -} - -export interface StaticBlock extends Omit { - type: "StaticBlock"; -} - -export interface ExpressionStatement extends BaseStatement { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface IfStatement extends BaseStatement { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate?: Statement | null | undefined; -} - -export interface LabeledStatement extends BaseStatement { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface BreakStatement extends BaseStatement { - type: "BreakStatement"; - label?: Identifier | null | undefined; -} - -export interface ContinueStatement extends BaseStatement { - type: "ContinueStatement"; - label?: Identifier | null | undefined; -} - -export interface WithStatement extends BaseStatement { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface SwitchStatement extends BaseStatement { - type: "SwitchStatement"; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface ReturnStatement extends BaseStatement { - type: "ReturnStatement"; - argument?: Expression | null | undefined; -} - -export interface ThrowStatement extends BaseStatement { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseStatement { - type: "TryStatement"; - block: BlockStatement; - handler?: CatchClause | null | undefined; - finalizer?: BlockStatement | null | undefined; -} - -export interface WhileStatement extends BaseStatement { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface DoWhileStatement extends BaseStatement { - type: "DoWhileStatement"; - body: Statement; - test: Expression; -} - -export interface ForStatement extends BaseStatement { - type: "ForStatement"; - init?: VariableDeclaration | Expression | null | undefined; - test?: Expression | null | undefined; - update?: Expression | null | undefined; - body: Statement; -} - -export interface BaseForXStatement extends BaseStatement { - left: VariableDeclaration | Pattern; - right: Expression; - body: Statement; -} - -export interface ForInStatement extends BaseForXStatement { - type: "ForInStatement"; -} - -export interface DebuggerStatement extends BaseStatement { - type: "DebuggerStatement"; -} - -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; - -export interface BaseDeclaration extends BaseStatement {} - -export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { - type: "FunctionDeclaration"; - /** It is null when a function declaration is a part of the `export default function` statement */ - id: Identifier | null; - body: BlockStatement; -} - -export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { - id: Identifier; -} - -export interface VariableDeclaration extends BaseDeclaration { - type: "VariableDeclaration"; - declarations: VariableDeclarator[]; - kind: "var" | "let" | "const" | "using" | "await using"; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: Pattern; - init?: Expression | null | undefined; -} - -export interface ExpressionMap { - ArrayExpression: ArrayExpression; - ArrowFunctionExpression: ArrowFunctionExpression; - AssignmentExpression: AssignmentExpression; - AwaitExpression: AwaitExpression; - BinaryExpression: BinaryExpression; - CallExpression: CallExpression; - ChainExpression: ChainExpression; - ClassExpression: ClassExpression; - ConditionalExpression: ConditionalExpression; - FunctionExpression: FunctionExpression; - Identifier: Identifier; - ImportExpression: ImportExpression; - Literal: Literal; - LogicalExpression: LogicalExpression; - MemberExpression: MemberExpression; - MetaProperty: MetaProperty; - NewExpression: NewExpression; - ObjectExpression: ObjectExpression; - SequenceExpression: SequenceExpression; - TaggedTemplateExpression: TaggedTemplateExpression; - TemplateLiteral: TemplateLiteral; - ThisExpression: ThisExpression; - UnaryExpression: UnaryExpression; - UpdateExpression: UpdateExpression; - YieldExpression: YieldExpression; -} - -export type Expression = ExpressionMap[keyof ExpressionMap]; - -export interface BaseExpression extends BaseNode {} - -export type ChainElement = SimpleCallExpression | MemberExpression; - -export interface ChainExpression extends BaseExpression { - type: "ChainExpression"; - expression: ChainElement; -} - -export interface ThisExpression extends BaseExpression { - type: "ThisExpression"; -} - -export interface ArrayExpression extends BaseExpression { - type: "ArrayExpression"; - elements: Array; -} - -export interface ObjectExpression extends BaseExpression { - type: "ObjectExpression"; - properties: Array; -} - -export interface PrivateIdentifier extends BaseNode { - type: "PrivateIdentifier"; - name: string; -} - -export interface Property extends BaseNode { - type: "Property"; - key: Expression | PrivateIdentifier; - value: Expression | Pattern; // Could be an AssignmentProperty - kind: "init" | "get" | "set"; - method: boolean; - shorthand: boolean; - computed: boolean; -} - -export interface PropertyDefinition extends BaseNode { - type: "PropertyDefinition"; - key: Expression | PrivateIdentifier; - value?: Expression | null | undefined; - computed: boolean; - static: boolean; -} - -export interface FunctionExpression extends BaseFunction, BaseExpression { - id?: Identifier | null | undefined; - type: "FunctionExpression"; - body: BlockStatement; -} - -export interface SequenceExpression extends BaseExpression { - type: "SequenceExpression"; - expressions: Expression[]; -} - -export interface UnaryExpression extends BaseExpression { - type: "UnaryExpression"; - operator: UnaryOperator; - prefix: true; - argument: Expression; -} - -export interface BinaryExpression extends BaseExpression { - type: "BinaryExpression"; - operator: BinaryOperator; - left: Expression | PrivateIdentifier; - right: Expression; -} - -export interface AssignmentExpression extends BaseExpression { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: Pattern | MemberExpression; - right: Expression; -} - -export interface UpdateExpression extends BaseExpression { - type: "UpdateExpression"; - operator: UpdateOperator; - argument: Expression; - prefix: boolean; -} - -export interface LogicalExpression extends BaseExpression { - type: "LogicalExpression"; - operator: LogicalOperator; - left: Expression; - right: Expression; -} - -export interface ConditionalExpression extends BaseExpression { - type: "ConditionalExpression"; - test: Expression; - alternate: Expression; - consequent: Expression; -} - -export interface BaseCallExpression extends BaseExpression { - callee: Expression | Super; - arguments: Array; -} -export type CallExpression = SimpleCallExpression | NewExpression; - -export interface SimpleCallExpression extends BaseCallExpression { - type: "CallExpression"; - optional: boolean; -} - -export interface NewExpression extends BaseCallExpression { - type: "NewExpression"; -} - -export interface MemberExpression extends BaseExpression, BasePattern { - type: "MemberExpression"; - object: Expression | Super; - property: Expression | PrivateIdentifier; - computed: boolean; - optional: boolean; -} - -export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; - -export interface BasePattern extends BaseNode {} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test?: Expression | null | undefined; - consequent: Statement[]; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Pattern | null; - body: BlockStatement; -} - -export interface Identifier extends BaseNode, BaseExpression, BasePattern { - type: "Identifier"; - name: string; -} - -export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; - -export interface SimpleLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value: string | boolean | number | null; - raw?: string | undefined; -} - -export interface RegExpLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: RegExp | null | undefined; - regex: { - pattern: string; - flags: string; - }; - raw?: string | undefined; -} - -export interface BigIntLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: bigint | null | undefined; - bigint: string; - raw?: string | undefined; -} - -export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - -export type BinaryOperator = - | "==" - | "!=" - | "===" - | "!==" - | "<" - | "<=" - | ">" - | ">=" - | "<<" - | ">>" - | ">>>" - | "+" - | "-" - | "*" - | "/" - | "%" - | "**" - | "|" - | "^" - | "&" - | "in" - | "instanceof"; - -export type LogicalOperator = "||" | "&&" | "??"; - -export type AssignmentOperator = - | "=" - | "+=" - | "-=" - | "*=" - | "/=" - | "%=" - | "**=" - | "<<=" - | ">>=" - | ">>>=" - | "|=" - | "^=" - | "&=" - | "||=" - | "&&=" - | "??="; - -export type UpdateOperator = "++" | "--"; - -export interface ForOfStatement extends BaseForXStatement { - type: "ForOfStatement"; - await: boolean; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { - type: "ArrowFunctionExpression"; - expression: boolean; - body: BlockStatement | Expression; -} - -export interface YieldExpression extends BaseExpression { - type: "YieldExpression"; - argument?: Expression | null | undefined; - delegate: boolean; -} - -export interface TemplateLiteral extends BaseExpression { - type: "TemplateLiteral"; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface TaggedTemplateExpression extends BaseExpression { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - tail: boolean; - value: { - /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ - cooked?: string | null | undefined; - raw: string; - }; -} - -export interface AssignmentProperty extends Property { - value: Pattern; - kind: "init"; - method: boolean; // false -} - -export interface ObjectPattern extends BasePattern { - type: "ObjectPattern"; - properties: Array; -} - -export interface ArrayPattern extends BasePattern { - type: "ArrayPattern"; - elements: Array; -} - -export interface RestElement extends BasePattern { - type: "RestElement"; - argument: Pattern; -} - -export interface AssignmentPattern extends BasePattern { - type: "AssignmentPattern"; - left: Pattern; - right: Expression; -} - -export type Class = ClassDeclaration | ClassExpression; -export interface BaseClass extends BaseNode { - superClass?: Expression | null | undefined; - body: ClassBody; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface MethodDefinition extends BaseNode { - type: "MethodDefinition"; - key: Expression | PrivateIdentifier; - value: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; -} - -export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { - type: "ClassDeclaration"; - /** It is null when a class declaration is a part of the `export default class` statement */ - id: Identifier | null; -} - -export interface ClassDeclaration extends MaybeNamedClassDeclaration { - id: Identifier; -} - -export interface ClassExpression extends BaseClass, BaseExpression { - type: "ClassExpression"; - id?: Identifier | null | undefined; -} - -export interface MetaProperty extends BaseExpression { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export type ModuleDeclaration = - | ImportDeclaration - | ExportNamedDeclaration - | ExportDefaultDeclaration - | ExportAllDeclaration; -export interface BaseModuleDeclaration extends BaseNode {} - -export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; -export interface BaseModuleSpecifier extends BaseNode { - local: Identifier; -} - -export interface ImportDeclaration extends BaseModuleDeclaration { - type: "ImportDeclaration"; - specifiers: Array; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface ImportSpecifier extends BaseModuleSpecifier { - type: "ImportSpecifier"; - imported: Identifier | Literal; -} - -export interface ImportAttribute extends BaseNode { - type: "ImportAttribute"; - key: Identifier | Literal; - value: Literal; -} - -export interface ImportExpression extends BaseExpression { - type: "ImportExpression"; - source: Expression; - options?: Expression | null | undefined; -} - -export interface ImportDefaultSpecifier extends BaseModuleSpecifier { - type: "ImportDefaultSpecifier"; -} - -export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { - type: "ImportNamespaceSpecifier"; -} - -export interface ExportNamedDeclaration extends BaseModuleDeclaration { - type: "ExportNamedDeclaration"; - declaration?: Declaration | null | undefined; - specifiers: ExportSpecifier[]; - attributes: ImportAttribute[]; - source?: Literal | null | undefined; -} - -export interface ExportSpecifier extends Omit { - type: "ExportSpecifier"; - local: Identifier | Literal; - exported: Identifier | Literal; -} - -export interface ExportDefaultDeclaration extends BaseModuleDeclaration { - type: "ExportDefaultDeclaration"; - declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; -} - -export interface ExportAllDeclaration extends BaseModuleDeclaration { - type: "ExportAllDeclaration"; - exported: Identifier | Literal | null; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface AwaitExpression extends BaseExpression { - type: "AwaitExpression"; - argument: Expression; -} diff --git a/node_modules/@types/estree/package.json b/node_modules/@types/estree/package.json deleted file mode 100644 index 68c0782..0000000 --- a/node_modules/@types/estree/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@types/estree", - "version": "1.0.8", - "description": "TypeScript definitions for estree", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", - "license": "MIT", - "contributors": [ - { - "name": "RReverser", - "githubUsername": "RReverser", - "url": "https://github.com/RReverser" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/estree" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd", - "typeScriptVersion": "5.1", - "nonNpm": true -} \ No newline at end of file diff --git a/node_modules/abstract-leveldown/.airtap.yml b/node_modules/abstract-leveldown/.airtap.yml deleted file mode 100644 index 260969d..0000000 --- a/node_modules/abstract-leveldown/.airtap.yml +++ /dev/null @@ -1,15 +0,0 @@ -browsers: - - name: chrome - version: latest - platform: Windows 10 - - name: internet explorer - version: '11' - - name: firefox - version: latest - platform: Windows 10 - - name: iphone - version: '9.0' - - name: android - version: '6.0' - - name: microsoftedge - version: latest diff --git a/node_modules/abstract-leveldown/.travis.yml b/node_modules/abstract-leveldown/.travis.yml deleted file mode 100644 index a81ab91..0000000 --- a/node_modules/abstract-leveldown/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -sudo: false -language: node_js - -matrix: - fast_finish: true - include: - - node_js: 6 - env: CMD=test - - node_js: 8 - env: CMD=test - - node_js: 10 - env: CMD=test - - node_js: stable - env: CMD=test-browsers - addons: - sauce_connect: true - hosts: - - airtap.local - -before_script: git fetch --tags - -script: - - DEBUG=airtap:* npm run $CMD - -after_success: npm run coverage - -notifications: - email: false diff --git a/node_modules/abstract-leveldown/CHANGELOG.md b/node_modules/abstract-leveldown/CHANGELOG.md deleted file mode 100644 index 99953c9..0000000 --- a/node_modules/abstract-leveldown/CHANGELOG.md +++ /dev/null @@ -1,962 +0,0 @@ -# Changelog - -_**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md)._ - -## [6.2.3] - 2020-04-03 - -### Changed - -- Upgrade `airtap` devDependency from `^2.0.0` to `^3.0.0` ([#360](https://github.com/Level/abstract-leveldown/issues/360)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Add `buffer` and `immediate` for browsers ([#355](https://github.com/Level/abstract-leveldown/issues/355), [#362](https://github.com/Level/abstract-leveldown/issues/362), [#363](https://github.com/Level/abstract-leveldown/issues/363)) ([**@Raynos**](https://github.com/Raynos), [**@hugomrdias**](https://github.com/hugomrdias), [**@vweevers**](https://github.com/vweevers)) - -## [6.2.2] - 2019-10-21 - -### Added - -- Add more range tests ([#353](https://github.com/Level/abstract-leveldown/issues/353)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.2.1] - 2019-10-01 - -### Fixed - -- Fix `manifest-test` to open & close its db ([#352](https://github.com/Level/abstract-leveldown/issues/352)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.2.0] - 2019-09-30 - -### Changed - -- Upgrade `hallmark` devDependency from `^1.0.0` to `^2.0.0` ([#349](https://github.com/Level/abstract-leveldown/issues/349)) ([**@vweevers**](https://github.com/vweevers)) -- Upgrade `standard` devDependency from `^13.0.1` to `^14.0.0` ([#348](https://github.com/Level/abstract-leveldown/issues/348)) ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Add manifest ([Level/community#83](https://github.com/Level/community/issues/83)) ([#351](https://github.com/Level/abstract-leveldown/issues/351)) ([**@vweevers**](https://github.com/vweevers)) -- Document mandatory methods ([#350](https://github.com/Level/abstract-leveldown/issues/350)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.1.1] - 2019-08-18 - -### Fixed - -- Remove `process.emitWarning` because it breaks AppVeyor builds ([`8e963c3`](https://github.com/Level/abstract-leveldown/commit/8e963c3)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.1.0] - 2019-08-18 - -### Changed - -- Upgrade `hallmark` devDependency from `^0.1.0` to `^1.0.0` ([#343](https://github.com/Level/abstract-leveldown/issues/343)) ([**@vweevers**](https://github.com/vweevers)) -- Upgrade `standard` devDependency from `^12.0.0` to `^13.0.1` ([#341](https://github.com/Level/abstract-leveldown/issues/341)) ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Add `clear()` method to delete all entries or a range ([#310](https://github.com/Level/abstract-leveldown/issues/310)) ([**@vweevers**](https://github.com/vweevers)). - -**Historical Note** The `clear()` method is experimental and optional for the time being. Please see the [README](https://github.com/Level/abstract-leveldown) for details. - -## [6.0.3] - 2019-04-26 - -### Changed - -- Upgrade `nyc` devDependency from `^13.2.0` to `^14.0.0` ([#334](https://github.com/Level/abstract-leveldown/issues/334)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Fix and test asynchronicity of empty batch ([#337](https://github.com/Level/abstract-leveldown/issues/337)) ([**@vweevers**](https://github.com/vweevers)) -- Fix Level badge ([`8993257`](https://github.com/Level/abstract-leveldown/commit/8993257)) ([**@vweevers**](https://github.com/vweevers)) -- Remove link to dead website ([`c0abe28`](https://github.com/Level/abstract-leveldown/commit/c0abe28)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.0.2] - 2019-03-30 - -### Changed - -- Upgrade `sinon` devDependency from `^6.0.0` to `^7.2.4` ([#330](https://github.com/Level/abstract-leveldown/issues/330)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Upgrade `nyc` devDependency from `^12.0.2` to `^13.2.0` ([#327](https://github.com/Level/abstract-leveldown/issues/327)) ([**@vweevers**](https://github.com/vweevers)) -- Upgrade `airtap` devDependency from `0.1.0` to `^2.0.0` ([#323](https://github.com/Level/abstract-leveldown/issues/323)) ([**@vweevers**](https://github.com/vweevers)) -- Apply common project tweaks ([#324](https://github.com/Level/abstract-leveldown/issues/324), [#325](https://github.com/Level/abstract-leveldown/issues/325)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Fix subtests by adding `t.plan()` ([#329](https://github.com/Level/abstract-leveldown/issues/329)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.0.1] - 2018-12-27 - -### Changed - -- Upgrade `hallmark` devDependency from `0.0.2` to `0.1.0` ([#316](https://github.com/level/abstract-leveldown/issues/316)) ([**@vweevers**](https://github.com/vweevers)) -- Split v6 upgrade guide into sections for consumers and implementors ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Remove range tests that assumed zero-length strings or Buffers meant "not defined" ([#319](https://github.com/level/abstract-leveldown/issues/319)) ([**@vweevers**](https://github.com/vweevers)) - -## [6.0.0] - 2018-10-20 - -_If you are upgrading, please consult the [Upgrade Guide](UPGRADING.md#v6)._ - -### Changed - -- Upgrade `airtap` devDependency from `0.0.5` to `0.1.0` ([#229](https://github.com/level/abstract-leveldown/issues/229), [#231](https://github.com/level/abstract-leveldown/issues/231), [#245](https://github.com/level/abstract-leveldown/issues/245), [`029f56a`](https://github.com/level/abstract-leveldown/commit/029f56a), [#252](https://github.com/level/abstract-leveldown/issues/252)) ([**@vweevers**](https://github.com/vweevers), [**@ralphtheninja**](https://github.com/ralphtheninja)) -- Upgrade `sinon` devDependency from `^5.0.0` to `^6.0.0` ([#232](https://github.com/level/abstract-leveldown/issues/232)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Upgrade `standard` devDependency from `^11.0.0` to `^12.0.0` ([#303](https://github.com/level/abstract-leveldown/issues/303)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Reject nullish values ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Make default `_serializeKey` and `_serializeValue` identity functions ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Don't coerce keys to strings to check if they're empty, instead check arrays explicitly ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Make `db` property mandatory and public on iterator and chained batch ([#257](https://github.com/level/abstract-leveldown/issues/257), [#309](https://github.com/level/abstract-leveldown/issues/309)) ([**@vweevers**](https://github.com/vweevers)) -- Align `AbstractChainedBatch#_clear` with `_put` and `_del` ([#257](https://github.com/level/abstract-leveldown/issues/257)) ([**@vweevers**](https://github.com/vweevers)) -- Add `AbstractChainedBatch#_write` with options ([#257](https://github.com/level/abstract-leveldown/issues/257)) ([**@vweevers**](https://github.com/vweevers)) -- Use `level-concat-iterator` instead of `collectEntries` ([#246](https://github.com/level/abstract-leveldown/issues/246)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Document API and test suite ([#251](https://github.com/level/abstract-leveldown/issues/251), [#290](https://github.com/level/abstract-leveldown/issues/290), [#295](https://github.com/level/abstract-leveldown/issues/295), [#296](https://github.com/level/abstract-leveldown/issues/296), [#305](https://github.com/level/abstract-leveldown/issues/305)) ([**@vweevers**](https://github.com/vweevers)) -- Export test suite as a single function ([#271](https://github.com/level/abstract-leveldown/issues/271), [#293](https://github.com/level/abstract-leveldown/issues/293), [#297](https://github.com/level/abstract-leveldown/issues/297)) ([**@vweevers**](https://github.com/vweevers), [**@ralphtheninja**](https://github.com/ralphtheninja)) -- Use factory function to create `db` instances in test suite ([#258](https://github.com/level/abstract-leveldown/issues/258), [#268](https://github.com/level/abstract-leveldown/issues/268), [#282](https://github.com/level/abstract-leveldown/issues/282)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers)) -- Isolate snapshot tests so that they can be skipped ([#239](https://github.com/level/abstract-leveldown/issues/239), [#274](https://github.com/level/abstract-leveldown/issues/274)) ([**@vweevers**](https://github.com/vweevers), [**@ralphtheninja**](https://github.com/ralphtheninja)) -- Isolate openAdvanced tests so that they can be skipped ([#271](https://github.com/level/abstract-leveldown/issues/271)) ([**@vweevers**](https://github.com/vweevers)) -- Rename `abstract/` to `test/` ([#253](https://github.com/level/abstract-leveldown/issues/253)) ([**@vweevers**](https://github.com/vweevers)) -- Refactor internal test methods to have the same signature `(test, testCommon)` ([#268](https://github.com/level/abstract-leveldown/issues/268), [#275](https://github.com/level/abstract-leveldown/issues/275)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Prefer `exports.*` over `module.exports.*` ([#276](https://github.com/level/abstract-leveldown/issues/276)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Tweak copyright years for less maintenance ([`0b2949a`](https://github.com/level/abstract-leveldown/commit/0b2949a)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Add `iterator#seek()` ([#237](https://github.com/level/abstract-leveldown/issues/237), [#302](https://github.com/level/abstract-leveldown/issues/302), [#307](https://github.com/level/abstract-leveldown/issues/307)) ([**@vweevers**](https://github.com/vweevers), [**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add `nyc` and `coveralls` devDependencies for code coverage ([#253](https://github.com/level/abstract-leveldown/issues/253)) ([**@vweevers**](https://github.com/vweevers)) -- Add `setUp` and `tearDown` to all sub tests ([#279](https://github.com/level/abstract-leveldown/issues/279), [#289](https://github.com/level/abstract-leveldown/issues/289)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add test for implementations that cannot support snapshots ([#239](https://github.com/level/abstract-leveldown/issues/239)) ([**@vweevers**](https://github.com/vweevers)) -- Add `hallmark` devDependency for Markdown style and contributors ([#312](https://github.com/level/abstract-leveldown/issues/312)) ([**@vweevers**](https://github.com/vweevers)) - -### Removed - -- Remove `location` ([#258](https://github.com/level/abstract-leveldown/issues/258)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove `lastLocation`, `cleanup`, `rimraf` ([#249](https://github.com/level/abstract-leveldown/issues/249)) ([**@vweevers**](https://github.com/vweevers)) -- Remove IE10 from Sauce Labs test matrix ([#312](https://github.com/level/abstract-leveldown/issues/312)) ([**@vweevers**](https://github.com/vweevers)) -- Remove node 9 from Travis ([`0b52395`](https://github.com/level/abstract-leveldown/commit/0b52395)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove tests that assumed support of boolean and NaN keys ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Remove range tests that assumed `null` meant "not defined" ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Remove sync test from `test/put-test.js` ([#300](https://github.com/level/abstract-leveldown/issues/300)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove empty `errorValues()` test ([#273](https://github.com/level/abstract-leveldown/issues/273)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove default `testCommon` parameter ([#264](https://github.com/level/abstract-leveldown/issues/264), [#271](https://github.com/level/abstract-leveldown/issues/271)) ([**@vweevers**](https://github.com/vweevers)) -- Remove `contributors` from `package.json` ([`542f350`](https://github.com/level/abstract-leveldown/commit/542f350)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove copyright headers from code ([`a36c04f`](https://github.com/level/abstract-leveldown/commit/a36c04f)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Make sure all `t.throw` tests check error messages correctly ([#286](https://github.com/level/abstract-leveldown/issues/286)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Check options objects properly for `null` ([#257](https://github.com/level/abstract-leveldown/issues/257), [#288](https://github.com/level/abstract-leveldown/issues/288)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers)) -- Serialize range options same as keys ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) -- Allow nullish and empty range options ([#277](https://github.com/level/abstract-leveldown/issues/277)) ([**@vweevers**](https://github.com/vweevers)) - -## [5.0.0] - 2018-05-22 - -### Changed - -- Upgrade `sinon` to `^5.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Tweak README ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Replace `const` with `var` to support IE10 ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Add node 10 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add `airtap` for browser tests ([**@vweevers**](https://github.com/vweevers)) - -### Removed - -- Remove node 4, 5 and 7 from Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove TypeScript tests ([**@vweevers**](https://github.com/vweevers)) -- Remove TypeScript typings ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [4.0.3] - 2018-02-21 - -### Changed - -- Upgrade `ts-node` to `^5.0.0` ([**@zixia**](https://github.com/zixia)) -- Upgrade `standard` to `^11.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Remove invalid TypeScript from `Batch` ([**@Tapppi**](https://github.com/Tapppi)) -- Add JSDoc to incorrectly inferred TypeScript types ([**@Tapppi**](https://github.com/Tapppi)) - -## [4.0.2] - 2018-02-09 - -### Fixed - -- Fix `iterator#next` to return `this` ([**@vweevers**](https://github.com/vweevers)) - -## [4.0.1] - 2018-02-09 - -### Added - -- Run test suite in TypeScript in addition to Node.js ([**@vweevers**](https://github.com/vweevers)) -- Add TypeScript smoke test ([**@vweevers**](https://github.com/vweevers)) -- Add TypeScript readme section with stability badge ([**@vweevers**](https://github.com/vweevers)) - -### Removed - -- Remove obsolete parameters from tests ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Update TypeScript typings for v4 ([**@vweevers**](https://github.com/vweevers)) -- Use ES6 classes in tests to please TypeScript ([**@vweevers**](https://github.com/vweevers)) -- Define default methods on prototype to please TypeScript ([**@vweevers**](https://github.com/vweevers)) - -**Historical Note** This was released as a patch because it only changed tests -and TypeScript typings (which are marked experimental and don't follow semver). - -## [4.0.0] - 2018-01-20 - -### Changed - -- Ignore empty range options in `AbstractLevelDOWN#_setupIteratorOptions` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Make `testCommon.js` the default value for `testCommon` parameter ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Use `Buffer.isBuffer()` instead of `AbstractLevelDOWN#isBuffer` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Cleanup iterator tests ([#161](https://github.com/level/abstract-leveldown/issues/161)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Pass test function as a parameter instead of setting local global ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Assert batch type is `'put'` or `'del'` ([**@vweevers**](https://github.com/vweevers)) -- Assert batch array elements are objects ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Add `standard` for linting ([#150](https://github.com/level/abstract-leveldown/issues/150)) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Test that callbacks are called asynchronously ([**@vweevers**](https://github.com/vweevers)) -- Test serialization extensibility ([**@vweevers**](https://github.com/vweevers)) -- Add [**@vweevers**](https://github.com/vweevers) to contributors ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add upgrade guide in `UPGRADING.md` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add node 9 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Remove `isLevelDOWN` function and corresponding tests ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove `AbstractLevelDOWN#approximateSize` method and corresponding tests ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove `testBuffer` in `abstract/put-get-del-test.js` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove object value test in `abstract/put-test.js` ([**@vweevers**](https://github.com/vweevers)) -- Remove serialize buffer tests ([**@vweevers**](https://github.com/vweevers)) -- Remove serialize object tests ([**@vweevers**](https://github.com/vweevers)) -- Remove `BufferType` parameter in `abstract/put-get-del-test.js`, use `Buffer` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Ensure stores are closed properly (fixes problems on Windows) ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Call back errors on next tick to avoid `zalgo` ([**@vweevers**](https://github.com/vweevers)) - -## [3.0.0] - 2017-11-04 - -### Added - -- Add node version badge ([**@vweevers**](https://github.com/vweevers)) - -### Removed - -- Drop support for `0.12`. Cause for new major version! ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Fix errors in `index.d.ts` ([**@sandersn**](https://github.com/sandersn)) - -## [2.7.2] - 2017-10-11 - -### Changed - -- Update `README` with new style ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.7.1] - 2017-09-30 - -### Changed - -- Refactor typings as ES2015 module ([**@MeirionHughes**](https://github.com/MeirionHughes)) - -## [2.7.0] - 2017-09-12 - -### Added - -- Add `TypeScript` definitions in `index.d.ts` ([**@MeirionHughes**](https://github.com/MeirionHughes)) - -## [2.6.3] - 2017-09-05 - -### Changed - -- Upgrade dependencies ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Convert nullish values to empty strings ([**@bigeasy**](https://github.com/bigeasy)) -- Use `t.equal(a, b)` instead of `t.ok(a === b)` ([**@bigeasy**](https://github.com/bigeasy)) -- Relax tests for serializing object in `abstract/chained-batch-test.js` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Add `GreenKeeper` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Test key/value serialization ([**@bigeasy**](https://github.com/bigeasy)) -- Test `undefined` value serializing to empty string ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Document `.status` property ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.6.2] - 2017-07-30 - -### Changed - -- Upgrade dependencies and float `devDependencies` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Update copyright years ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Update node versions on Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Test serialization extensibility ([**@juliangruber**](https://github.com/juliangruber)) - -### Fixed - -- Fix put test on object serialization ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.6.1] - 2016-09-12 - -### Fixed - -- Fix `null` case in default value serializer (fixes problems in `2.6.0`) ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.6.0] - 2016-03-10 - -### Changed - -- Use proto delegation to patch methods on db ([**@deanlandolt**](https://github.com/deanlandolt)) -- Allow serialization functions to return buffers ([**@deanlandolt**](https://github.com/deanlandolt)) - -### Added - -- Add `collectBatchOps` function to buffer `_put` and `_del` inputs in `abstract/chained-batch-test.js` ([**@deanlandolt**](https://github.com/deanlandolt)) - -### Removed - -- Remove unnecessary initialization hackery in `abstract/chained-batch-test.js` ([**@deanlandolt**](https://github.com/deanlandolt)) - -**Historical Note** This release was a breaking change. See [**@juliangruber**](https://github.com/juliangruber)'s [comment](https://github.com/Level/abstract-leveldown/pull/85#issuecomment-246980978) for more information. - -## [2.5.0] - 2016-05-01 - -### Changed - -- Upgrade dependencies and add more node versions to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Add dependency badge to `README` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add `AbstractLevelDOWN#_serializeKey` ([**@juliangruber**](https://github.com/juliangruber)) -- Add `AbstractLevelDOWN#_serializeValue` ([**@juliangruber**](https://github.com/juliangruber)) -- Add `AbstractChainedBatch#_serializeKey` ([**@juliangruber**](https://github.com/juliangruber)) -- Add `AbstractChainedBatch#_serializeValue` ([**@juliangruber**](https://github.com/juliangruber)) -- Test `_serialize` with object and buffer ([**@juliangruber**](https://github.com/juliangruber)) - -### Removed - -- Remove stringification of keys and values ([**@juliangruber**](https://github.com/juliangruber)) -- Remove `.toBuffer` ([**@juliangruber**](https://github.com/juliangruber)) - -### Fixed - -- Update `memdown` url ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- `AbstractLevelDOWN#._checkKey` does not take three parameters ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Only show build status for the master branch ([**@watson**](https://github.com/watson)) -- Fix minor typos in `README` ([**@timkuijsten**](https://github.com/timkuijsten)) - -## [2.4.1] - 2015-08-29 - -### Fixed - -- Remove use of `const` ([**@nolanlawson**](https://github.com/nolanlawson)) - -## [2.4.0] - 2015-05-19 - -### Added - -- Add `.status` property to `AbstractLevelDOWN` ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.3.1] - 2015-05-18 - -### Added - -- Link to `level/community` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Extract `Contributors` section from `README` into `level/community` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Document `isLevelDown` function ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.3.0] - 2015-05-18 - -### Changed - -- Use `t.equal(a, b)` instead of `t.ok(a === b)` ([**@juliangruber**](https://github.com/juliangruber)) -- Export API from `index.js` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Import `isLevelDOWN` function to `is-leveldown.js` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.2.2] - 2015-05-13 - -### Fixed - -- Revert changes to `location` in `2.2.1` ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.2.1] - 2015-05-12 - -### Fixed - -- Copy paste error gave wrong test description ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- `t.throws()` is different for `tape` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Assert `location` is not an empty string ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.2.0] - 2015-05-10 - -### Added - -- Test `{ sync: true }` option in `abstract/put-test.js` ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.1.4] - 2015-04-28 - -### Fixed - -- Use `t.equal()` with `tape` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.1.3] - 2015-04-28 - -### Changed - -- Change from `tap` to `tape` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.1.2] - 2015-04-27 - -### Changed - -- Convert buffer to string so we can compare ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.1.1] - 2015-04-27 - -### Changed - -- Update logo and copyright ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Add [**@ralphtheninja**](https://github.com/ralphtheninja) to contributors ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add `0.12` and `iojs` to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Include `.nonErrorValues()` test in `abstract/put-get-del-test.js` ([**@hden**](https://github.com/hden)) -- `rvagg/node-abstract-leveldown` moved to `level/abstract-leveldown` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Fix Travis for `0.8` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.1.0] - 2014-11-09 - -### Changed - -- Use `setTimeout` instead of `process.nextTick` ([**@bigeasy**](https://github.com/bigeasy)) - -### Added - -- Add [**@watson**](https://github.com/watson) to contributors ([**@rvagg**](https://github.com/rvagg)) - -### Fixed - -- Don't fail if no value is returned by `._get` ([**@watson**](https://github.com/watson)) -- Use `error` test function when testing for errors ([**@watson**](https://github.com/watson)) - -## [2.0.3] - 2014-10-02 - -No change. - -## [2.0.2] - 2014-10-02 - -### Added - -- Test atomic batch operations ([**@calvinmetcalf**](https://github.com/calvinmetcalf)) - -## [2.0.1] - 2014-09-01 - -### Changed - -- Set default values for options to `.open`, `.get`, `.put`, `.del` and `.batch` ([**@watson**](https://github.com/watson)) -- Update pattern for setting default options for the iterator ([**@watson**](https://github.com/watson)) -- Allow boolean options to be falsy/truthy ([**@watson**](https://github.com/watson)) - -### Removed - -- Remove default options that are too `LevelDOWN` specific ([**@watson**](https://github.com/watson)) - -## [2.0.0] - 2014-08-26 - -### Changed - -- Switch to allowing writes of empty values, `null`, `undefined`, `''`, `[]` and empty buffer ([**@juliangruber**](https://github.com/juliangruber)) -- Rename `AbstractLevelDOWN#_checkKeyValue` to `AbstractLevelDOWN#_checkKey` ([**@rvagg**](https://github.com/rvagg)) - -## [1.0.0] - 2014-08-24 - -### Changed - -- Ensure `Boolean` iterator options are `Boolean` ([**@watson**](https://github.com/watson)) - -### Added - -- Test that an error is thrown when location isn't a string ([**@calvinmetcalf**](https://github.com/calvinmetcalf)) -- Test opening and closing the store ([**@calvinmetcalf**](https://github.com/calvinmetcalf)) -- Test iterator with `limit` set to `0` ([**@watson**](https://github.com/watson)) -- Add more tests to `abstract/batch-test.js` ([**@calvinmetcalf**](https://github.com/calvinmetcalf)) -- Set default values of iterator options ([**@watson**](https://github.com/watson)) -- Account for batch options that are `null` ([**@calvinmetcalf**](https://github.com/calvinmetcalf)) - -### Removed - -- Remove options.start hackery ([**@rvagg**](https://github.com/rvagg)) - -## [0.12.4] - 2014-08-20 - -### Changed - -- Change license to plain MIT ([**@andrewrk**](https://github.com/andrewrk)) - -### Added - -- Test that `simple-iterator` returns buffers ([**@kesla**](https://github.com/kesla)) -- Test implicit snapshots ([**@kesla**](https://github.com/kesla)) - -## [0.12.3] - 2014-06-27 - -### Changed - -- Upgrade `xtend` dependency ([**@andrewrk**](https://github.com/andrewrk)) - -## [0.12.2] - 2014-04-26 - -### Changed - -- Have `isTypedArray` check for existence of `ArrayBuffer` and `Uint8Array` constructors before usage ([**@rvagg**](https://github.com/rvagg)) - -## [0.12.1] - 2014-04-26 - -### Changed - -- Set default `BufferType` in `abstract/put-get-del-test.js` to `Buffer` instead of `ArrayBuffer` ([**@maxogden**](https://github.com/maxogden)) - -## [0.12.0] - 2014-03-12 - -### Changed - -- Revert to pure `Buffer` and remove usage of `Uint16Array` ([**@rvagg**](https://github.com/rvagg)) - -## [0.11.4] - 2014-03-11 - -### Removed - -- Remove duplicate call to `t.end()` ([**@maxogden**](https://github.com/maxogden)) - -## [0.11.3] - 2014-01-26 - -### Changed - -- Loosen the buffer type check ([**@rvagg**](https://github.com/rvagg)) - -## [0.11.2] - 2013-12-05 - -### Added - -- Add npm badges ([**@rvagg**](https://github.com/rvagg)) - -### Fixed - -- Fix iterator tests in `test.js` ([**@rvagg**](https://github.com/rvagg)) - -## [0.11.1] - 2013-11-15 - -### Changed - -- Adjust `abstract/approximate-size-test.js` to account for snappy compression ([**@rvagg**](https://github.com/rvagg)) - -## [0.11.0] - 2013-10-14 - -### Added - -- Normalize `iterator()` options with `AbstractLevelDOWN#_setupIteratorOptions` ([**@rvagg**](https://github.com/rvagg)) - -## [0.10.2] - 2013-09-06 - -### Changed - -- Refactor duplicated versions of `isTypedArray` into `abstract/util.js` ([**@rvagg**](https://github.com/rvagg)) -- Refactor duplicated versions of `'NotFound'` checks into `abstract/util.js`, fixed too-strict version in `get-test.js` ([**@rvagg**](https://github.com/rvagg)) - -## [0.10.1] - 2013-08-29 - -### Changed - -- Relax check for `Not Found` error message to be case insensitive in `get-test.js` ([**@rvagg**](https://github.com/rvagg)) - -### Added - -- Add [**@substack**](https://github.com/substack) to contributors ([**@rvagg**](https://github.com/rvagg)) - -## [0.10.0] - 2013-08-19 - -### Added - -- Test `gt`, `gte`, `lt` and `lte` ranges ([**@dominictarr**](https://github.com/dominictarr)) - -## [0.9.0] - 2013-08-11 - -### Changed - -- Make `AbstractChainedBatch` extensible ([**@kesla**](https://github.com/kesla)) -- Export `AbstractChainedBatch` from `abstract-leveldown.js` ([**@kesla**](https://github.com/kesla)) - -### Added - -- Test simultaneous get's ([**@kesla**](https://github.com/kesla)) -- Test `AbstractChainedBatch` extensibility ([**@kesla**](https://github.com/kesla)) - -### Fixed - -- Fix broken test assertion in `abstract/get-test.js` ([**@rvagg**](https://github.com/rvagg)) -- Fix tests that weren't running properly ([**@kesla**](https://github.com/kesla)) - -## [0.8.2] - 2013-08-02 - -No changes. Merely published changes made in `0.8.1`. - -## [0.8.1] - 2013-08-02 - -### Changed - -- Remove use of `const` in `testCommon.js` ([**@rvagg**](https://github.com/rvagg)) - -**Historical Note** The version in `package.json` was changed from `0.7.4` to `0.8.1`. The `0.8.1` tag exists but this version was never published to npm. - -## [0.8.0] - 2013-08-02 - -### Changed - -- Use `process.browser` check instead of `process.title == 'browser'` ([**@rvagg**](https://github.com/rvagg)) - -### Added - -- Add `BufferType` parameter to `abstract/put-get-del-test.js` for `bops` support ([**@rvagg**](https://github.com/rvagg)) -- Add `isTypedArray` function which checks `ArrayBuffer` or `Uint8Array` for `bops` support ([**@rvagg**](https://github.com/rvagg)) - -### Fixed - -- Fix `cleanup` function not calling back when browserified ([**@rvagg**](https://github.com/rvagg)) - -**Historical Note** It seems the version in `package.json` was never changed to `0.8.0` in the git history, even though the `0.8.0` tag exists. Most likely `package.json` was modified locally during `npm publish` but was never committed. - -## [0.7.4] - 2013-08-02 - -### Fixed - -- Fix problems related to `browserify` and `rimraf` ([**@rvagg**](https://github.com/rvagg)) - -## [0.7.3] - 2013-07-26 - -### Added - -- Add [**@pgte**](https://github.com/pgte) to contributors ([**@rvagg**](https://github.com/rvagg)) -- Test iterator with `limit` set to `-1` ([**@kesla**](https://github.com/kesla)) - -## [0.7.2] - 2013-07-08 - -### Changed - -- Freeze chained batch state after `.write()` has been called ([**@rvagg**](https://github.com/rvagg)) -- Make `NotFound` error case insensitive ([**@rvagg**](https://github.com/rvagg)) -- Use `self` rather than binding functions to `this` ([**@juliangruber**](https://github.com/juliangruber)) - -### Added - -- Add `AbstractChainedBatch#_checkWritten` ([**@rvagg**](https://github.com/rvagg)) -- Test delete on non-existent key ([**@rvagg**](https://github.com/rvagg)) -- Test iterator with `start` after database `end` ([**@juliangruber**](https://github.com/juliangruber)) - -### Fixed - -- Don't coerce values to strings in browser ([**@maxogden**](https://github.com/maxogden)) -- Make tests work in node and browser ([**@maxogden**](https://github.com/maxogden)) - -## [0.7.1] - 2013-05-15 - -### Changed - -- Adjust tests to be browserable ([**@rvagg**](https://github.com/rvagg)) - -## [0.7.0] - 2013-05-14 - -### Added - -- Add `AbstractChainedBatch#clear` ([**@rvagg**](https://github.com/rvagg)) - -## [0.6.1] - 2013-05-14 - -### Changed - -- Make `AbstractIterator` call back with an error instead of throwing on nexting and ending ([**@mcollina**](https://github.com/mcollina)) - -## [0.6.0] - 2013-05-14 - -### Changed - -- Split `t.deepEqual()` into multiple `t.equal()` in `abstract/iterator-test.js` ([**@rvagg**](https://github.com/rvagg)) -- Make `AbstractIterator` call back with an error instead of throwing on nexting and ending ([**@mcollina**](https://github.com/mcollina)) - -## [0.5.0] - 2013-05-14 - -### Changed - -- Make `iterator.end(cb)` and `iterator.next(cb)` call back with an error instead of throwing ([**@mcollina**](https://github.com/mcollina)) - -## [0.4.0] - 2013-05-14 - -### Changed - -- Move `AbstractIterator` from `abstract-leveldown.js` to `abstract-iterator.js` ([**@rvagg**](https://github.com/rvagg)) - -### Added - -- Add `AbstractChainedBatch` ([**@rvagg**](https://github.com/rvagg)) -- Add `AbstractLevelDOWN#_chainedBatch` ([**@rvagg**](https://github.com/rvagg)) -- Add `abstract/batch-test.js` and `abstract/chained-batch-test.js` ([**@rvagg**](https://github.com/rvagg)) - -## [0.4.0-1] - 2013-05-14 - -### Added - -- Add [**@No9**](https://github.com/No9) and [**@mcollina**](https://github.com/mcollina) to contributors ([**@rvagg**](https://github.com/rvagg)) - -## [0.3.0] - 2013-05-04 - -### Changed - -- Use `this._checkKeyValue()` instead of local function ([**@rvagg**](https://github.com/rvagg)) -- Use `this._isBuffer()` instead of `Buffer.isBuffer()` ([**@rvagg**](https://github.com/rvagg)) - -### Added - -- Restore test for opening the database without options ([**@rvagg**](https://github.com/rvagg)) -- Add `AbstractLevelDOWN#_isBuffer` so it can be overridden ([**@rvagg**](https://github.com/rvagg)) -- Add `AbstractLevelDOWN#_checkKeyValue` so it can be overridden ([**@rvagg**](https://github.com/rvagg)) - -## [0.2.3] - 2013-05-04 - -### Removed - -- Remove test for opening the database without options ([**@rvagg**](https://github.com/rvagg)) - -## [0.2.2] - 2013-05-04 - -### Changed - -- Split `.open()` tests into `.open()` and `.openAdvanced()` ([**@rvagg**](https://github.com/rvagg)) - -## [0.2.1] - 2013-05-04 - -### Changed - -- Convert values to `string` in `abstract/put-get-del-test.js` if `Buffer` is `undefined` ([**@rvagg**](https://github.com/rvagg)) - -## [0.2.0] - 2013-05-04 - -### Changed - -- Convert values to `string` in `abstract/get-test.js` if `Buffer` is `undefined` ([**@rvagg**](https://github.com/rvagg)) -- Don't stringify keys and values in `abstract/iterator-test.js` ([**@maxogden**](https://github.com/maxogden)) - -### Added - -- Add `process.browser` check for `start` and `end` keys in browser ([**@maxogden**](https://github.com/maxogden)) -- Add `levelup` contributors ([**@rvagg**](https://github.com/rvagg)) - -### Fixed - -- Fix `tape` compatibility issues ([**@maxogden**](https://github.com/maxogden)) - -## [0.1.0] - 2013-04-23 - -### Added - -- Import abstract tests from `leveldown` ([**@maxogden**](https://github.com/maxogden)) - -### Fixed - -- Clarify `README` ([**@rvagg**](https://github.com/rvagg)) - -## [0.0.2] - 2013-03-18 - -### Changed - -- Export `checkKeyValue` ([**@rvagg**](https://github.com/rvagg)) - -### Added - -- Add node 0.10 to Travis ([**@rvagg**](https://github.com/rvagg)) -- Add `Buffer.isBuffer()` checks to keys and values ([**@rvagg**](https://github.com/rvagg)) - -## [0.0.1] - 2013-03-18 - -### Added - -- Add `checkKeyValue` function for more complete error checking ([**@rvagg**](https://github.com/rvagg)) - -## 0.0.0 - 2013-03-15 - -First release. :seedling: - -[6.2.3]: https://github.com/Level/abstract-leveldown/compare/v6.2.2...v6.2.3 - -[6.2.2]: https://github.com/Level/abstract-leveldown/compare/v6.2.1...v6.2.2 - -[6.2.1]: https://github.com/Level/abstract-leveldown/compare/v6.2.0...v6.2.1 - -[6.2.0]: https://github.com/Level/abstract-leveldown/compare/v6.1.1...v6.2.0 - -[6.1.1]: https://github.com/Level/abstract-leveldown/compare/v6.1.0...v6.1.1 - -[6.1.0]: https://github.com/Level/abstract-leveldown/compare/v6.0.3...v6.1.0 - -[6.0.3]: https://github.com/Level/abstract-leveldown/compare/v6.0.2...v6.0.3 - -[6.0.2]: https://github.com/Level/abstract-leveldown/compare/v6.0.1...v6.0.2 - -[6.0.1]: https://github.com/Level/abstract-leveldown/compare/v6.0.0...v6.0.1 - -[6.0.0]: https://github.com/Level/abstract-leveldown/compare/v5.0.0...v6.0.0 - -[5.0.0]: https://github.com/Level/abstract-leveldown/compare/v4.0.3...v5.0.0 - -[4.0.3]: https://github.com/Level/abstract-leveldown/compare/v4.0.2...v4.0.3 - -[4.0.2]: https://github.com/Level/abstract-leveldown/compare/v4.0.1...v4.0.2 - -[4.0.1]: https://github.com/Level/abstract-leveldown/compare/v4.0.0...v4.0.1 - -[4.0.0]: https://github.com/Level/abstract-leveldown/compare/v3.0.0...v4.0.0 - -[3.0.0]: https://github.com/Level/abstract-leveldown/compare/v2.7.2...v3.0.0 - -[2.7.2]: https://github.com/Level/abstract-leveldown/compare/v2.7.1...v2.7.2 - -[2.7.1]: https://github.com/Level/abstract-leveldown/compare/v2.7.0...v2.7.1 - -[2.7.0]: https://github.com/Level/abstract-leveldown/compare/v2.6.3...v2.7.0 - -[2.6.3]: https://github.com/Level/abstract-leveldown/compare/v2.6.2...v2.6.3 - -[2.6.2]: https://github.com/Level/abstract-leveldown/compare/v2.6.1...v2.6.2 - -[2.6.1]: https://github.com/Level/abstract-leveldown/compare/v2.6.0...v2.6.1 - -[2.6.0]: https://github.com/Level/abstract-leveldown/compare/v2.5.0...v2.6.0 - -[2.5.0]: https://github.com/Level/abstract-leveldown/compare/v2.4.1...v2.5.0 - -[2.4.1]: https://github.com/Level/abstract-leveldown/compare/v2.4.0...v2.4.1 - -[2.4.0]: https://github.com/Level/abstract-leveldown/compare/v2.3.1...v2.4.0 - -[2.3.1]: https://github.com/Level/abstract-leveldown/compare/v2.3.0...v2.3.1 - -[2.3.0]: https://github.com/Level/abstract-leveldown/compare/v2.2.2...v2.3.0 - -[2.2.2]: https://github.com/Level/abstract-leveldown/compare/v2.2.1...v2.2.2 - -[2.2.1]: https://github.com/Level/abstract-leveldown/compare/v2.2.0...v2.2.1 - -[2.2.0]: https://github.com/Level/abstract-leveldown/compare/v2.1.4...v2.2.0 - -[2.1.4]: https://github.com/Level/abstract-leveldown/compare/v2.1.3...v2.1.4 - -[2.1.3]: https://github.com/Level/abstract-leveldown/compare/v2.1.2...v2.1.3 - -[2.1.2]: https://github.com/Level/abstract-leveldown/compare/v2.1.1...v2.1.2 - -[2.1.1]: https://github.com/Level/abstract-leveldown/compare/v2.1.0...v2.1.1 - -[2.1.0]: https://github.com/Level/abstract-leveldown/compare/v2.0.3...v2.1.0 - -[2.0.3]: https://github.com/Level/abstract-leveldown/compare/v2.0.2...v2.0.3 - -[2.0.2]: https://github.com/Level/abstract-leveldown/compare/v2.0.1...v2.0.2 - -[2.0.1]: https://github.com/Level/abstract-leveldown/compare/v2.0.0...v2.0.1 - -[2.0.0]: https://github.com/Level/abstract-leveldown/compare/v1.0.0...v2.0.0 - -[1.0.0]: https://github.com/Level/abstract-leveldown/compare/v0.12.4...v1.0.0 - -[0.12.4]: https://github.com/Level/abstract-leveldown/compare/v0.12.3...v0.12.4 - -[0.12.3]: https://github.com/Level/abstract-leveldown/compare/v0.12.2...v0.12.3 - -[0.12.2]: https://github.com/Level/abstract-leveldown/compare/v0.12.1...v0.12.2 - -[0.12.1]: https://github.com/Level/abstract-leveldown/compare/v0.12.0...v0.12.1 - -[0.12.0]: https://github.com/Level/abstract-leveldown/compare/v0.11.4...v0.12.0 - -[0.11.4]: https://github.com/Level/abstract-leveldown/compare/v0.11.3...v0.11.4 - -[0.11.3]: https://github.com/Level/abstract-leveldown/compare/v0.11.2...v0.11.3 - -[0.11.2]: https://github.com/Level/abstract-leveldown/compare/0.11.1...v0.11.2 - -[0.11.1]: https://github.com/Level/abstract-leveldown/compare/0.11.0...0.11.1 - -[0.11.0]: https://github.com/Level/abstract-leveldown/compare/0.10.2...0.11.0 - -[0.10.2]: https://github.com/Level/abstract-leveldown/compare/0.10.1...0.10.2 - -[0.10.1]: https://github.com/Level/abstract-leveldown/compare/0.10.0...0.10.1 - -[0.10.0]: https://github.com/Level/abstract-leveldown/compare/0.9.0...0.10.0 - -[0.9.0]: https://github.com/Level/abstract-leveldown/compare/0.8.2...0.9.0 - -[0.8.2]: https://github.com/Level/abstract-leveldown/compare/0.8.1...0.8.2 - -[0.8.1]: https://github.com/Level/abstract-leveldown/compare/0.8.0...0.8.1 - -[0.8.0]: https://github.com/Level/abstract-leveldown/compare/0.7.4...0.8.0 - -[0.7.4]: https://github.com/Level/abstract-leveldown/compare/0.7.3...0.7.4 - -[0.7.3]: https://github.com/Level/abstract-leveldown/compare/0.7.2...0.7.3 - -[0.7.2]: https://github.com/Level/abstract-leveldown/compare/0.7.1...0.7.2 - -[0.7.1]: https://github.com/Level/abstract-leveldown/compare/0.7.0...0.7.1 - -[0.7.0]: https://github.com/Level/abstract-leveldown/compare/0.6.1...0.7.0 - -[0.6.1]: https://github.com/Level/abstract-leveldown/compare/0.6.0...0.6.1 - -[0.6.0]: https://github.com/Level/abstract-leveldown/compare/0.5.0...0.6.0 - -[0.5.0]: https://github.com/Level/abstract-leveldown/compare/0.4.0...0.5.0 - -[0.4.0]: https://github.com/Level/abstract-leveldown/compare/0.4.0-1...0.4.0 - -[0.4.0-1]: https://github.com/Level/abstract-leveldown/compare/0.3.0...0.4.0-1 - -[0.3.0]: https://github.com/Level/abstract-leveldown/compare/0.2.3...0.3.0 - -[0.2.3]: https://github.com/Level/abstract-leveldown/compare/0.2.2...0.2.3 - -[0.2.2]: https://github.com/Level/abstract-leveldown/compare/0.2.1...0.2.2 - -[0.2.1]: https://github.com/Level/abstract-leveldown/compare/0.2.0...0.2.1 - -[0.2.0]: https://github.com/Level/abstract-leveldown/compare/0.1.0...0.2.0 - -[0.1.0]: https://github.com/Level/abstract-leveldown/compare/0.0.2...0.1.0 - -[0.0.2]: https://github.com/Level/abstract-leveldown/compare/0.0.1...0.0.2 - -[0.0.1]: https://github.com/Level/abstract-leveldown/compare/0.0.0...0.0.1 diff --git a/node_modules/abstract-leveldown/CONTRIBUTORS.md b/node_modules/abstract-leveldown/CONTRIBUTORS.md deleted file mode 100644 index a7b60a7..0000000 --- a/node_modules/abstract-leveldown/CONTRIBUTORS.md +++ /dev/null @@ -1,27 +0,0 @@ -# Contributors - -| Name | GitHub | Social | -| :------------------------- | :----------------------------------------------------- | :----------------------------------------------------------------------- | -| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) | -| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | -| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) | -| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) | -| **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) | -| **Max Ogden** | [**@maxogden**](https://github.com/maxogden) | [**@maxogden@twitter**](https://twitter.com/maxogden) | -| **Thomas Watson Steen** | | | -| **Alan Gutierrez** | [**@bigeasy**](https://github.com/bigeasy) | [**@bigeasy@twitter**](https://twitter.com/bigeasy) | -| **Dean Landolt** | [**@deanlandolt**](https://github.com/deanlandolt) | | -| **Calvin Metcalf** | [**@calvinmetcalf**](https://github.com/calvinmetcalf) | | -| **Meirion Hughes** | [**@MeirionHughes**](https://github.com/MeirionHughes) | | -| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) | -| **Andrew Kelley** | [**@andrewrk**](https://github.com/andrewrk) | | -| **Tapani Moilanen** | [**@Tapppi**](https://github.com/Tapppi) | | -| **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) | -| **Hao-kang Den** | | | -| **Hugo Dias** | | | -| **Jake Verbaten** | [**@Raynos**](https://github.com/Raynos) | [**@raynos@twitter**](https://twitter.com/raynos) | -| **Kyle Robinson Young** | [**@shama**](https://github.com/shama) | [**@shamakry@twitter**](https://twitter.com/shamakry) | -| **Nathan Shively-Sanders** | [**@sandersn**](https://github.com/sandersn) | | -| **Nolan Lawson** | [**@nolanlawson**](https://github.com/nolanlawson) | [**@nolan@toot.cafe**](https://toot.cafe/@nolan) | -| **Tim Kuijsten** | [**@timkuijsten**](https://github.com/timkuijsten) | [**@timkuijsten@mastodon.social**](https://mastodon.social/@timkuijsten) | -| **Tim Oxley** | [**@timoxley**](https://github.com/timoxley) | [**@secoif@twitter**](https://twitter.com/secoif) | diff --git a/node_modules/abstract-leveldown/LICENSE.md b/node_modules/abstract-leveldown/LICENSE.md deleted file mode 100644 index 1e78cf8..0000000 --- a/node_modules/abstract-leveldown/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -**Copyright © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md).** - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/abstract-leveldown/README.md b/node_modules/abstract-leveldown/README.md deleted file mode 100644 index 1955327..0000000 --- a/node_modules/abstract-leveldown/README.md +++ /dev/null @@ -1,629 +0,0 @@ -# abstract-leveldown - -> An abstract prototype matching the [`leveldown`][leveldown] API. Useful for extending [`levelup`](https://github.com/Level/levelup) functionality by providing a replacement to `leveldown`. - -[![level badge][level-badge]](https://github.com/Level/awesome) -[![npm](https://img.shields.io/npm/v/abstract-leveldown.svg?label=&logo=npm)](https://www.npmjs.com/package/abstract-leveldown) -[![Node version](https://img.shields.io/node/v/abstract-leveldown.svg)](https://www.npmjs.com/package/abstract-leveldown) -[![Travis](https://img.shields.io/travis/com/Level/abstract-leveldown.svg?logo=travis&label=)](https://travis-ci.com/Level/abstract-leveldown) -[![Coverage Status](https://coveralls.io/repos/github/Level/abstract-leveldown/badge.svg)](https://coveralls.io/github/Level/abstract-leveldown) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -[![npm](https://img.shields.io/npm/dm/abstract-leveldown.svg?label=dl)](https://www.npmjs.com/package/abstract-leveldown) -[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) -[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors) - -## Table of Contents - -
Click to expand - -- [Background](#background) -- [Example](#example) -- [Browser Support](#browser-support) -- [Public API For Consumers](#public-api-for-consumers) -- [Private API For Implementors](#private-api-for-implementors) -- [Test Suite](#test-suite) -- [Spread The Word](#spread-the-word) -- [Install](#install) -- [Contributing](#contributing) -- [Big Thanks](#big-thanks) -- [Donate](#donate) -- [License](#license) - -
- -## Background - -This module provides a simple base prototype for a key-value store. It has a public API for consumers and a private API for implementors. To implement a `abstract-leveldown` compliant store, extend its prototype and override the private underscore versions of the methods. For example, to implement `put()`, override `_put()` on your prototype. - -Where possible, the default private methods have sensible _noop_ defaults that essentially do nothing. For example, `_open(callback)` will invoke `callback` on a next tick. Other methods like `_clear(..)` have functional defaults. Each method listed below documents whether implementing it is mandatory. - -The private methods are always provided with consistent arguments, regardless of what is passed in through the public API. All public methods provide argument checking: if a consumer calls `open()` without a callback argument they'll get an `Error('open() requires a callback argument')`. - -Where optional arguments are involved, private methods receive sensible defaults: a `get(key, callback)` call translates to `_get(key, options, callback)` where the `options` argument is an empty object. These arguments are documented below. - -**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md). - -## Example - -Let's implement a simplistic in-memory [`leveldown`][leveldown] replacement: - -```js -var AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN -var util = require('util') - -// Constructor -function FakeLevelDOWN () { - AbstractLevelDOWN.call(this) -} - -// Our new prototype inherits from AbstractLevelDOWN -util.inherits(FakeLevelDOWN, AbstractLevelDOWN) - -FakeLevelDOWN.prototype._open = function (options, callback) { - // Initialize a memory storage object - this._store = {} - - // Use nextTick to be a nice async citizen - process.nextTick(callback) -} - -FakeLevelDOWN.prototype._serializeKey = function (key) { - // As an example, prefix all input keys with an exclamation mark. - // Below methods will receive serialized keys in their arguments. - return '!' + key -} - -FakeLevelDOWN.prototype._put = function (key, value, options, callback) { - this._store[key] = value - process.nextTick(callback) -} - -FakeLevelDOWN.prototype._get = function (key, options, callback) { - var value = this._store[key] - - if (value === undefined) { - // 'NotFound' error, consistent with LevelDOWN API - return process.nextTick(callback, new Error('NotFound')) - } - - process.nextTick(callback, null, value) -} - -FakeLevelDOWN.prototype._del = function (key, options, callback) { - delete this._store[key] - process.nextTick(callback) -} -``` - -Now we can use our implementation with `levelup`: - -```js -var levelup = require('levelup') - -var db = levelup(new FakeLevelDOWN()) - -db.put('foo', 'bar', function (err) { - if (err) throw err - - db.get('foo', function (err, value) { - if (err) throw err - - console.log(value) // 'bar' - }) -}) -``` - -See [`memdown`](https://github.com/Level/memdown/) if you are looking for a complete in-memory replacement for `leveldown`. - -## Browser Support - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/abstract-leveldown.svg)](https://saucelabs.com/u/abstract-leveldown) - -## Public API For Consumers - -### `db = constructor(..)` - -Constructors typically take a `location` argument pointing to a location on disk where the data will be stored. Since not all implementations are disk-based and some are non-persistent, implementors are free to take zero or more arguments in their constructor. - -### `db.status` - -A read-only property. An `abstract-leveldown` compliant store can be in one of the following states: - -- `'new'` - newly created, not opened or closed -- `'opening'` - waiting for the store to be opened -- `'open'` - successfully opened the store, available for use -- `'closing'` - waiting for the store to be closed -- `'closed'` - store has been successfully closed, should not be used. - -### `db.supports` - -A read-only [manifest](https://github.com/Level/supports). Might be used like so: - -```js -if (!db.supports.permanence) { - throw new Error('Persistent storage is required') -} - -if (db.supports.bufferKeys && db.supports.promises) { - await db.put(Buffer.from('key'), 'value') -} -``` - -### `db.open([options, ]callback)` - -Open the store. The `callback` function will be called with no arguments when the store has been successfully opened, or with a single error argument if the open operation failed for any reason. - -The optional `options` argument may contain: - -- `createIfMissing` _(boolean, default: `true`)_: If `true` and the store doesn't exist it will be created. If `false` and the store doesn't exist, `callback` will receive an error. -- `errorIfExists` _(boolean, default: `false`)_: If `true` and the store exists, `callback` will receive an error. - -Not all implementations support the above options. - -### `db.close(callback)` - -Close the store. The `callback` function will be called with no arguments if the operation is successful or with a single `error` argument if closing failed for any reason. - -### `db.get(key[, options], callback)` - -Get a value from the store by `key`. The optional `options` object may contain: - -- `asBuffer` _(boolean, default: `true`)_: Whether to return the `value` as a Buffer. If `false`, the returned type depends on the implementation. - -The `callback` function will be called with an `Error` if the operation failed for any reason. If successful the first argument will be `null` and the second argument will be the value. - -### `db.put(key, value[, options], callback)` - -Store a new entry or overwrite an existing entry. There are no `options` by default but implementations may add theirs. The `callback` function will be called with no arguments if the operation is successful or with an `Error` if putting failed for any reason. - -### `db.del(key[, options], callback)` - -Delete an entry. There are no `options` by default but implementations may add theirs. The `callback` function will be called with no arguments if the operation is successful or with an `Error` if deletion failed for any reason. - -### `db.batch(operations[, options], callback)` - -Perform multiple _put_ and/or _del_ operations in bulk. The `operations` argument must be an `Array` containing a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation. - -Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the `type` is either `'put'` or `'del'`. In the case of `'del'` the `value` property is ignored. - -There are no `options` by default but implementations may add theirs. The `callback` function will be called with no arguments if the batch is successful or with an `Error` if the batch failed for any reason. - -### `db.batch()` - -Returns a [`chainedBatch`](#chainedbatch). - -### `db.iterator([options])` - -Returns an [`iterator`](#iterator). Accepts the following range options: - -- `gt` (greater than), `gte` (greater than or equal) define the lower bound of the range to be iterated. Only entries where the key is greater than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries iterated will be the same. -- `lt` (less than), `lte` (less than or equal) define the higher bound of the range to be iterated. Only entries where the key is less than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries iterated will be the same. -- `reverse` _(boolean, default: `false`)_: iterate entries in reverse order. Beware that a reverse seek can be slower than a forward seek. -- `limit` _(number, default: `-1`)_: limit the number of entries collected by this iterator. This number represents a _maximum_ number of entries and may not be reached if you get to the end of the range first. A value of `-1` means there is no limit. When `reverse=true` the entries with the highest keys will be returned instead of the lowest keys. - -Legacy options: - -- `start`: instead use `gte` -- `end`: instead use `lte`. - -**Note** Zero-length strings, buffers and arrays as well as `null` and `undefined` are invalid as keys, yet valid as range options. These types are significant in encodings like [`bytewise`](https://github.com/deanlandolt/bytewise) and [`charwise`](https://github.com/dominictarr/charwise) as well as some underlying stores like IndexedDB. Consumers of an implementation should assume that `{ gt: undefined }` is _not_ the same as `{}`. An implementation can choose to: - -- [_Serialize_](#db_serializekeykey) or [_encode_][encoding-down] these types to make them meaningful -- Have no defined behavior (moving the concern to a higher level) -- Delegate to an underlying store (moving the concern to a lower level). - -If you are an implementor, a final note: the [abstract test suite](#test-suite) does not test these types. Whether they are supported or how they sort is up to you; add custom tests accordingly. - -In addition to range options, `iterator()` takes the following options: - -- `keys` _(boolean, default: `true`)_: whether to return the key of each entry. If set to `false`, calls to `iterator.next(callback)` will yield keys with a value of `undefined`. -- `values` _(boolean, default: `true`)_: whether to return the value of each entry. If set to `false`, calls to `iterator.next(callback)` will yield values with a value of `undefined`. -- `keyAsBuffer` _(boolean, default: `true`)_: Whether to return the key of each entry as a Buffer. If `false`, the returned type depends on the implementation. -- `valueAsBuffer` _(boolean, default: `true`)_: Whether to return the value of each entry as a Buffer. - -Lastly, an implementation is free to add its own options. - -### `db.clear([options, ]callback)` - -**This method is experimental. Not all implementations support it yet.** - -Delete all entries or a range. Not guaranteed to be atomic. Accepts the following range options (with the same rules as on iterators): - -- `gt` (greater than), `gte` (greater than or equal) define the lower bound of the range to be deleted. Only entries where the key is greater than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries deleted will be the same. -- `lt` (less than), `lte` (less than or equal) define the higher bound of the range to be deleted. Only entries where the key is less than (or equal to) this option will be included in the range. When `reverse=true` the order will be reversed, but the entries deleted will be the same. -- `reverse` _(boolean, default: `false`)_: delete entries in reverse order. Only effective in combination with `limit`, to remove the last N records. -- `limit` _(number, default: `-1`)_: limit the number of entries to be deleted. This number represents a _maximum_ number of entries and may not be reached if you get to the end of the range first. A value of `-1` means there is no limit. When `reverse=true` the entries with the highest keys will be deleted instead of the lowest keys. - -If no options are provided, all entries will be deleted. The `callback` function will be called with no arguments if the operation was successful or with an `Error` if it failed for any reason. - -### `chainedBatch` - -#### `chainedBatch.put(key, value)` - -Queue a `put` operation on this batch. This may throw if `key` or `value` is invalid. - -#### `chainedBatch.del(key)` - -Queue a `del` operation on this batch. This may throw if `key` is invalid. - -#### `chainedBatch.clear()` - -Clear all queued operations on this batch. - -#### `chainedBatch.write([options, ]callback)` - -Commit the queued operations for this batch. All operations will be written atomically, that is, they will either all succeed or fail with no partial commits. - -There are no `options` by default but implementations may add theirs. The `callback` function will be called with no arguments if the batch is successful or with an `Error` if the batch failed for any reason. - -After `write` has been called, no further operations are allowed. - -#### `chainedBatch.db` - -A reference to the `db` that created this chained batch. - -### `iterator` - -An iterator allows you to _iterate_ the entire store or a range. It operates on a snapshot of the store, created at the time `db.iterator()` was called. This means reads on the iterator are unaffected by simultaneous writes. Most but not all implementations can offer this guarantee. - -An iterator keeps track of when a `next()` is in progress and when an `end()` has been called so it doesn't allow concurrent `next()` calls, it does allow `end()` while a `next()` is in progress and it doesn't allow either `next()` or `end()` after `end()` has been called. - -#### `iterator.next(callback)` - -Advance the iterator and yield the entry at that key. If an error occurs, the `callback` function will be called with an `Error`. Otherwise, the `callback` receives `null`, a `key` and a `value`. The type of `key` and `value` depends on the options passed to `db.iterator()`. - -If the iterator has reached its end, both `key` and `value` will be `undefined`. This happens in the following situations: - -- The end of the store has been reached -- The end of the range has been reached -- The last `iterator.seek()` was out of range. - -**Note:** Don't forget to call `iterator.end()`, even if you received an error. - -#### `iterator.seek(target)` - -Seek the iterator to a given key or the closest key. Subsequent calls to `iterator.next()` will yield entries with keys equal to or larger than `target`, or equal to or smaller than `target` if the `reverse` option passed to `db.iterator()` was true. - -If range options like `gt` were passed to `db.iterator()` and `target` does not fall within that range, the iterator will reach its end. - -**Note:** At the time of writing, [`leveldown`][leveldown] is the only known implementation to support `seek()`. In other implementations, it is a noop. - -#### `iterator.end(callback)` - -End iteration and free up underlying resources. The `callback` function will be called with no arguments on success or with an `Error` if ending failed for any reason. - -#### `iterator.db` - -A reference to the `db` that created this iterator. - -### Type Support - -The following applies to any method above that takes a `key` argument or option: all implementations _must_ support a `key` of type String and _should_ support a `key` of type Buffer. A `key` may not be `null`, `undefined`, a zero-length Buffer, zero-length string or zero-length array. - -The following applies to any method above that takes a `value` argument or option: all implementations _must_ support a `value` of type String or Buffer. A `value` may not be `null` or `undefined` due to preexisting significance in streams and iterators. - -Support of other key and value types depends on the implementation as well as its underlying storage. See also [`db._serializeKey`](#db_serializekeykey) and [`db._serializeValue`](#db_serializevaluevalue). - -## Private API For Implementors - -Each of these methods will receive exactly the number and order of arguments described. Optional arguments will receive sensible defaults. All callbacks are error-first and must be asynchronous. - -If an operation within your implementation is synchronous, be sure to invoke the callback on a next tick using `process.nextTick` or some other means of microtask scheduling. For convenience, the prototypes of `AbstractLevelDOWN`, `AbstractIterator` and `AbstractChainedBatch` include a `_nextTick` method that is compatible with node and browsers. - -### `db = AbstractLevelDOWN([manifest])` - -The constructor. Sets the `.status` to `'new'`. Optionally takes a [manifest](https://github.com/Level/supports) object which `abstract-leveldown` will enrich: - -```js -AbstractLevelDOWN.call(this, { - bufferKeys: true, - snapshots: true, - // .. -}) -``` - -### `db._open(options, callback)` - -Open the store. The `options` object will always have the following properties: `createIfMissing`, `errorIfExists`. If opening failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_open()` is a sensible noop and invokes `callback` on a next tick. - -### `db._close(callback)` - -Close the store. If closing failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_close()` is a sensible noop and invokes `callback` on a next tick. - -### `db._serializeKey(key)` - -Convert a `key` to a type supported by the underlying storage. All methods below that take a `key` argument or option - including `db._iterator()` with its range options and `iterator._seek()` with its `target` argument - will receive serialized keys. For example, if `_serializeKey` is implemented as: - -```js -FakeLevelDOWN.prototype._serializeKey = function (key) { - return Buffer.isBuffer(key) ? key : String(key) -} -``` - -Then `db.get(2, callback)` translates into `db._get('2', options, callback)`. Similarly, `db.iterator({ gt: 2 })` translates into `db._iterator({ gt: '2', ... })` and `iterator.seek(2)` translates into `iterator._seek('2')`. - -If the underlying storage supports any JavaScript type or if your implementation wraps another implementation, it is recommended to make `_serializeKey` an identity function (returning the key as-is). Serialization is irreversible, unlike _encoding_ as performed by implementations like [`encoding-down`][encoding-down]. This also applies to `_serializeValue`. - -The default `_serializeKey()` is an identity function. - -### `db._serializeValue(value)` - -Convert a `value` to a type supported by the underlying storage. All methods below that take a `value` argument or option will receive serialized values. For example, if `_serializeValue` is implemented as: - -```js -FakeLevelDOWN.prototype._serializeValue = function (value) { - return Buffer.isBuffer(value) ? value : String(value) -} -``` - -Then `db.put(key, 2, callback)` translates into `db._put(key, '2', options, callback)`. - -The default `_serializeValue()` is an identity function. - -### `db._get(key, options, callback)` - -Get a value by `key`. The `options` object will always have the following properties: `asBuffer`. If the key does not exist, call the `callback` function with a `new Error('NotFound')`. Otherwise call `callback` with `null` as the first argument and the value as the second. - -The default `_get()` invokes `callback` on a next tick with a `NotFound` error. It must be overridden. - -### `db._put(key, value, options, callback)` - -Store a new entry or overwrite an existing entry. There are no default options but `options` will always be an object. If putting failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_put()` invokes `callback` on a next tick. It must be overridden. - -### `db._del(key, options, callback)` - -Delete an entry. There are no default options but `options` will always be an object. If deletion failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_del()` invokes `callback` on a next tick. It must be overridden. - -### `db._batch(operations, options, callback)` - -Perform multiple _put_ and/or _del_ operations in bulk. The `operations` argument is always an `Array` containing a list of operations to be executed sequentially, although as a whole they should be performed as an atomic operation. Each operation is guaranteed to have at least `type` and `key` properties. There are no default options but `options` will always be an object. If the batch failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_batch()` invokes `callback` on a next tick. It must be overridden. - -### `db._chainedBatch()` - -The default `_chainedBatch()` returns a functional `AbstractChainedBatch` instance that uses `db._batch(array, options, callback)` under the hood. The prototype is available on the main exports for you to extend. If you want to implement chainable batch operations in a different manner then you should extend `AbstractChainedBatch` and return an instance of this prototype in the `_chainedBatch()` method: - -```js -var AbstractChainedBatch = require('abstract-leveldown').AbstractChainedBatch -var inherits = require('util').inherits - -function ChainedBatch (db) { - AbstractChainedBatch.call(this, db) -} - -inherits(ChainedBatch, AbstractChainedBatch) - -FakeLevelDOWN.prototype._chainedBatch = function () { - return new ChainedBatch(this) -} -``` - -### `db._iterator(options)` - -The default `_iterator()` returns a noop `AbstractIterator` instance. It must be overridden, by extending `AbstractIterator` (available on the main module exports) and returning an instance of this prototype in the `_iterator(options)` method. - -The `options` object will always have the following properties: `reverse`, `keys`, `values`, `limit`, `keyAsBuffer` and `valueAsBuffer`. - -### `db._clear(options, callback)` - -**This method is experimental and optional for the time being. To enable its tests, set the [`clear` option of the test suite](#excluding-tests) to `true`.** - -Delete all entries or a range. Does not have to be atomic. It is recommended (and possibly mandatory in the future) to operate on a snapshot so that writes scheduled after a call to `clear()` will not be affected. - -The default `_clear()` uses `_iterator()` and `_del()` to provide a reasonable fallback, but requires binary key support. It is _recommended_ to implement `_clear()` with more performant primitives than `_iterator()` and `_del()` if the underlying storage has such primitives. Implementations that don't support binary keys _must_ implement their own `_clear()`. - -Implementations that wrap another `db` can typically forward the `_clear()` call to that `db`, having transformed range options if necessary. - -The `options` object will always have the following properties: `reverse` and `limit`. - -### `iterator = AbstractIterator(db)` - -The first argument to this constructor must be an instance of your `AbstractLevelDOWN` implementation. The constructor will set `iterator.db` which is used to access `db._serialize*` and ensures that `db` will not be garbage collected in case there are no other references to it. - -#### `iterator._next(callback)` - -Advance the iterator and yield the entry at that key. If nexting failed, call the `callback` function with an `Error`. Otherwise, call `callback` with `null`, a `key` and a `value`. - -The default `_next()` invokes `callback` on a next tick. It must be overridden. - -#### `iterator._seek(target)` - -Seek the iterator to a given key or the closest key. This method is optional. - -#### `iterator._end(callback)` - -Free up underlying resources. This method is guaranteed to only be called once. If ending failed, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -The default `_end()` invokes `callback` on a next tick. Overriding is optional. - -### `chainedBatch = AbstractChainedBatch(db)` - -The first argument to this constructor must be an instance of your `AbstractLevelDOWN` implementation. The constructor will set `chainedBatch.db` which is used to access `db._serialize*` and ensures that `db` will not be garbage collected in case there are no other references to it. - -#### `chainedBatch._put(key, value)` - -Queue a `put` operation on this batch. - -#### `chainedBatch._del(key)` - -Queue a `del` operation on this batch. - -#### `chainedBatch._clear()` - -Clear all queued operations on this batch. - -#### `chainedBatch._write(options, callback)` - -The default `_write` method uses `db._batch`. If the `_write` method is overridden it must atomically commit the queued operations. There are no default options but `options` will always be an object. If committing fails, call the `callback` function with an `Error`. Otherwise call `callback` without any arguments. - -## Test Suite - -To prove that your implementation is `abstract-leveldown` compliant, include the abstract test suite in your `test.js` (or similar): - -```js -const test = require('tape') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -suite({ - test: test, - factory: function () { - return new YourDOWN() - } -}) -``` - -This is the most minimal setup. The `test` option _must_ be a function that is API-compatible with `tape`. The `factory` option _must_ be a function that returns a unique and isolated database instance. The factory will be called many times by the test suite. - -If your implementation is disk-based we recommend using [`tempy`](https://github.com/sindresorhus/tempy) (or similar) to create unique temporary directories. Your setup could look something like: - -```js -const test = require('tape') -const tempy = require('tempy') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -suite({ - test: test, - factory: function () { - return new YourDOWN(tempy.directory()) - } -}) -``` - -### Excluding tests - -As not every implementation can be fully compliant due to limitations of its underlying storage, some tests may be skipped. For example, to skip snapshot tests: - -```js -suite({ - // .. - snapshots: false -}) -``` - -This also serves as a signal to users of your implementation. The following options are available: - -- `bufferKeys`: set to `false` if binary keys are not supported by the underlying storage -- `seek`: set to `false` if your `iterator` does not implement `_seek` -- `clear`: defaults to `false` until a next major release. Set to `true` if your implementation either implements `_clear()` itself or is suitable to use the default implementation of `_clear()` (which requires binary key support). -- `snapshots`: set to `false` if any of the following is true: - - Reads don't operate on a [snapshot](#iterator) - - Snapshots are created asynchronously -- `createIfMissing` and `errorIfExists`: set to `false` if `db._open()` does not support these options. - -This metadata will be moved to manifests (`db.supports`) in the future. - -### Setup and teardown - -To perform (a)synchronous work before or after each test, you may define `setUp` and `tearDown` functions: - -```js -suite({ - // .. - setUp: function (t) { - t.end() - }, - tearDown: function (t) { - t.end() - } -}) -``` - -### Reusing `testCommon` - -The input to the test suite is a `testCommon` object. Should you need to reuse `testCommon` for your own (additional) tests, use the included utility to create a `testCommon` with defaults: - -```js -const test = require('tape') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -const testCommon = suite.common({ - test: test, - factory: function () { - return new YourDOWN() - } -}) - -suite(testCommon) -``` - -The `testCommon` object will have all the properties describe above: `test`, `factory`, `setUp`, `tearDown` and the skip options. You might use it like so: - -```js -test('setUp', testCommon.setUp) - -test('custom test', function (t) { - var db = testCommon.factory() - // .. -}) - -test('another custom test', function (t) { - var db = testCommon.factory() - // .. -}) - -test('tearDown', testCommon.tearDown) -``` - -## Spread The Word - -If you'd like to share your awesome implementation with the world, here's what you might want to do: - -- Add an awesome badge to your `README`: `![level badge](https://leveljs.org/img/badge.svg)` -- Publish your awesome module to [npm](https://npmjs.org) -- Send a Pull Request to [Level/awesome](https://github.com/Level/awesome) to advertise your work! - -## Install - -With [npm](https://npmjs.org) do: - -``` -npm install abstract-leveldown -``` - -## Contributing - -[`Level/abstract-leveldown`](https://github.com/Level/abstract-leveldown) is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details. - -## Big Thanks - -Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](https://saucelabs.com). - -[![Sauce Labs logo](./sauce-labs.svg)](https://saucelabs.com) - -## Donate - -To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖 - -### Backers - -[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level) - -### Sponsors - -[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level) - -## License - -[MIT](LICENSE.md) © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md). - -[level-badge]: https://leveljs.org/img/badge.svg - -[encoding-down]: https://github.com/Level/encoding-down - -[leveldown]: https://github.com/Level/leveldown diff --git a/node_modules/abstract-leveldown/UPGRADING.md b/node_modules/abstract-leveldown/UPGRADING.md deleted file mode 100644 index e19c647..0000000 --- a/node_modules/abstract-leveldown/UPGRADING.md +++ /dev/null @@ -1,322 +0,0 @@ -# Upgrade Guide - -This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md). - -## Table of Contents - -
Click to expand - -- [v6](#v6) -- [v5](#v5) -- [v4](#v4) -- [v3](#v3) - -
- -## v6 - -This release brings a major refactoring of the test suite, decouples `abstract-leveldown` from disk-based implementations and solves long-standing issues around serialization and type support. Because the changes are substantial, this guide has two sections: - -1. **Changes to public API** - for consumers of any implementation. -2. **Changes to private API** - intended for implementors. - -### Changes to public API - -#### Nullish values are rejected - -In addition to rejecting `null` and `undefined` as _keys_, `abstract-leveldown` now also rejects these types as _values_, due to preexisting significance in streams and iterators. - -Before this, the behavior of these types depended on a large number of factors: `_serializeValue` and type support of the underlying storage, whether `get()`, `iterator()` or a stream was used to retrieve values, the `keys` and `asBuffer` options of `iterator()` and finally, which encoding was selected. - -#### Range options are serialized - -Previously, range options like `lt` were passed through as-is, unlike keys. - -#### The rules for range options have been relaxed - -Because `null`, `undefined`, zero-length strings and zero-length buffers are significant types in encodings like `bytewise` and `charwise`, they became valid as range options. In fact, any type is now valid. This means `db.iterator({ gt: undefined })` is not the same as `db.iterator({})`. - -Furthermore, `abstract-leveldown` makes no assumptions about the meaning of these types. Range tests that assumed `null` meant "not defined" have been removed. - -#### Zero-length array keys are rejected - -Though this was already the case because `_checkKey` stringified its input before checking the length, that behavior has been replaced with an explicit `Array.isArray()` check and a new error message. - -#### No longer assumes support of boolean and `NaN` keys - -A test that asserted boolean and `NaN` keys were valid has been removed. - -#### Browser support - -IE10 has been dropped. - -### Changes to private API - -#### `location` was removed - -`AbstractLevelDOWN` is no longer associated with a `location`. It's up to the implementation to handle it if it's required. - -If your implementation has a `location` and you previously did: - -```js -function YourDOWN (location) { - AbstractLevelDOWN.call(this, location) -} -``` - -You must now do: - -```js -function YourDOWN (location) { - this.location = location - AbstractLevelDOWN.call(this) -} -``` - -Be sure to include appropriate type checks. If you relied on the default `AbstractLevelDOWN` behavior that would be: - -```js -if (typeof location !== 'string') { - throw new Error('constructor requires a location string argument') -} -``` - -#### Abstract test suite has moved to a single entry point - -Instead of including test files individually, you can and should include the test suite with one `require()` statement. If you previously did: - -```js -const test = require('tape') -const testCommon = require('abstract-leveldown/testCommon') -const YourDOWN = require('.') - -require('abstract-leveldown/abstract/get-test').all(YourDOWN, test, testCommon) -require('abstract-leveldown/abstract/put-test').all(YourDOWN, test, testCommon) - -// etc -``` - -You must now do: - -```js -const test = require('tape') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -suite({ - test: test, - factory: function () { - return new YourDOWN() - } -}) -``` - -The input to the test suite is a new form of `testCommon`. Should you need to reuse `testCommon` for your own (additional) tests, use the included utility to create a `testCommon` with defaults: - -```js -const test = require('tape') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -const testCommon = suite.common({ - test: test, - factory: function () { - return new YourDOWN() - } -}) - -suite(testCommon) -``` - -As part of removing `location`, the abstract tests no longer use `testCommon.location()`. Instead an implementation _must_ implement `factory()` which _must_ return a unique and isolated database instance. This allows implementations to pass options to their constructor. - -The `testCommon.cleanup` method has been removed. Because `factory()` returns a unique database instance, cleanup should no longer be necessary. The `testCommon.lastLocation` method has also been removed as there is no remaining use of it in abstract tests. - -Previously, implementations using the default `testCommon` had to include `rimraf` in their `devDependencies` and browser-based implementations had to exclude `rimraf` from browserify builds. This is no longer the case. - -If your implementation is disk-based we recommend using [`tempy`](https://github.com/sindresorhus/tempy) (or similar) to create unique temporary directories. Together with `factory()` your setup could now look something like: - -```js -const test = require('tape') -const tempy = require('tempy') -const suite = require('abstract-leveldown/test') -const YourDOWN = require('.') - -suite({ - test: test, - factory: function () { - return new YourDOWN(tempy.directory()) - } -}) -``` - -#### The `collectEntries` utility has moved - -The `testCommon.collectEntries` method has moved to the npm package `level-concat-iterator`. If your (additional) tests depend on `collectEntries` and you previously did: - -```js -testCommon.collectEntries(iterator, function (err, entries) {}) -``` - -You must now do: - -```js -const concat = require('level-concat-iterator') -concat(iterator, function (err, entries) {}) -``` - -#### Setup and teardown became noops - -Because cleanup is no longer necessary, the `testCommon.setUp` and `testCommon.tearDown` methods are now noops by default. If you do need to perform (a)synchronous work before or after each test, `setUp` and `tearDown` can be overridden: - -```js -suite({ - // .. - setUp: function (t) { - t.end() - }, - tearDown: function (t) { - t.end() - } -}) -``` - -#### Optional tests have been separated - -If your implementation does not support snapshots or other optional features, the relevant tests may be skipped. For example: - -```js -suite({ - // .. - snapshots: false -}) -``` - -Please see the [README](README.md) for a list of options. Note that some of these have replaced `process.browser` checks. - -#### Iterator must have a `db` reference - -The `db` argument of the `AbstractIterator` constructor became mandatory, as well as a public `db` property on the instance. Its existence is not new; the test suite now asserts that your implementation also has it. - -#### Seeking became part of official API - -If your implementation previously defined the public `iterator.seek(target)`, it must now define the private `iterator._seek(target)`. The new public API is equal to the reference implementation of `leveldown` except for two differences: - -- The `target` argument is not type checked, this is up to the implementation. -- The `target` argument is passed through `db._serializeKey`. - -Please see the [README](README.md) for details. - -#### Chained batch has been refactored - -- The default `_clear` method is no longer a noop; instead it clears the operations queued by `_put` and/or `_del` -- The `_write` method now takes an `options` object as its first argument -- The `db` argument of the `AbstractChainedBatch` constructor became mandatory, as well as a public `db` property on the instance, which was previously named `_db`. - -#### Default `_serializeKey` and `_serializeValue` became identity functions - -They return whatever is given. Previously they were opinionated and mostly geared towards string- and Buffer-based storages. Implementations that didn't already define their own serialization should now do so, according to the types that they support. Please refer to the [README](README.md) for recommended behavior. - -## v5 - -Dropped support for node 4. No other breaking changes. - -## v4 - -#### default `testCommon` parameter - -The `testCommon` parameter will now default to `abstract-leveldown/testCommon.js`. You can omit this parameter, unless your implementation needs a custom version. - -If your code today looks something like: - -```js -const test = require('tape') -const testCommon = require('abstract-leveldown/testCommon') -const leveldown = require('./your-leveldown') -const abstract = require('abstract-leveldown/abstract/get-test') - -abstract.all(leveldown, test, testCommon) -``` - -You can simplify it to: - -```js -const test = require('tape') -const leveldown = require('./your-leveldown') -const abstract = require('abstract-leveldown/abstract/get-test') - -abstract.all(leveldown, test) -``` - -#### `testBuffer` parameter removed - -The `abstract/put-get-del-test.js` previously took a custom `testBuffer` parameter. After an [analysis](https://github.com/Level/abstract-leveldown/pull/175#issuecomment-353867144) of various implementations we came to the conclusion that the parameter has no use. - -If your implementation is using this abstract test, change from: - -```js -const test = require('tape') -const testCommon = require('abstract-leveldown/testCommon') -const leveldown = require('./your-leveldown') -const fs = require('fs') -const path = require('path') -const testBuffer = fs.readFileSync(path.join(__dirname, 'data/testdata.bin')) -const abstract = require('abstract-leveldown/abstract/put-get-del-test') - -abstract.all(leveldown, test, testBuffer, testCommon) -``` - -to: - -```js -const test = require('tape') -const testCommon = require('abstract-leveldown/testCommon') -const leveldown = require('./your-leveldown') -const abstract = require('abstract-leveldown/abstract/put-get-del-test') - -abstract.all(leveldown, test, testCommon) -``` - -or if `testCommon` is also redundant, to: - -```js -const test = require('tape') -const leveldown = require('./your-leveldown') -const abstract = require('abstract-leveldown/abstract/put-get-del-test') - -abstract.all(leveldown, test) -``` - -#### `.approximateSize` method removed - -The `.approximateSize` method has been removed from the public API. It is heavily related to `LevelDB` and more often than not, other stores lack the native primitives to implement this. If you did implement the internal `_approximateSize` method, that is now dead code. To preserve the method in your public API, rename it to `approximateSize` and also take care of the initialization code. Look to `leveldown` for inspiration. - -Also, the corresponding abstract tests have been removed, so your implementation can no longer require `abstract/approximate-size-test`. - -#### `._isBuffer` method removed - -Because `Buffer` is available in all environments nowadays, there is no need for alternatives like typed arrays. It is preferred to use `Buffer` and `Buffer.isBuffer()` directly. - -#### `isLevelDOWN` function removed - -This was a legacy function. - -#### `ranges-test.js` renamed - -We have refactored a lot of the tests. Specifically the iterator tests were split in two and in that process we renamed `ranges-test.js` to `iterator-range-test.js`. - -If your implementation is using these tests then change from: - -```js -const abstract = require('abstract-leveldown/abstract/ranges-test') -``` - -to: - -```js -const abstract = require('abstract-leveldown/abstract/iterator-range-test') -``` - -## v3 - -No changes to the API. New major version because support for node 0.12 was dropped. diff --git a/node_modules/abstract-leveldown/abstract-chained-batch.js b/node_modules/abstract-leveldown/abstract-chained-batch.js deleted file mode 100644 index bcdb9fa..0000000 --- a/node_modules/abstract-leveldown/abstract-chained-batch.js +++ /dev/null @@ -1,86 +0,0 @@ -var nextTick = require('./next-tick') - -function AbstractChainedBatch (db) { - if (typeof db !== 'object' || db === null) { - throw new TypeError('First argument must be an abstract-leveldown compliant store') - } - - this.db = db - this._operations = [] - this._written = false -} - -AbstractChainedBatch.prototype._checkWritten = function () { - if (this._written) { - throw new Error('write() already called on this batch') - } -} - -AbstractChainedBatch.prototype.put = function (key, value) { - this._checkWritten() - - var err = this.db._checkKey(key) || this.db._checkValue(value) - if (err) throw err - - key = this.db._serializeKey(key) - value = this.db._serializeValue(value) - - this._put(key, value) - - return this -} - -AbstractChainedBatch.prototype._put = function (key, value) { - this._operations.push({ type: 'put', key: key, value: value }) -} - -AbstractChainedBatch.prototype.del = function (key) { - this._checkWritten() - - var err = this.db._checkKey(key) - if (err) throw err - - key = this.db._serializeKey(key) - this._del(key) - - return this -} - -AbstractChainedBatch.prototype._del = function (key) { - this._operations.push({ type: 'del', key: key }) -} - -AbstractChainedBatch.prototype.clear = function () { - this._checkWritten() - this._clear() - - return this -} - -AbstractChainedBatch.prototype._clear = function () { - this._operations = [] -} - -AbstractChainedBatch.prototype.write = function (options, callback) { - this._checkWritten() - - if (typeof options === 'function') { callback = options } - if (typeof callback !== 'function') { - throw new Error('write() requires a callback argument') - } - if (typeof options !== 'object' || options === null) { - options = {} - } - - this._written = true - this._write(options, callback) -} - -AbstractChainedBatch.prototype._write = function (options, callback) { - this.db._batch(this._operations, options, callback) -} - -// Expose browser-compatible nextTick for dependents -AbstractChainedBatch.prototype._nextTick = nextTick - -module.exports = AbstractChainedBatch diff --git a/node_modules/abstract-leveldown/abstract-iterator.js b/node_modules/abstract-leveldown/abstract-iterator.js deleted file mode 100644 index 8fb0f9c..0000000 --- a/node_modules/abstract-leveldown/abstract-iterator.js +++ /dev/null @@ -1,77 +0,0 @@ -var nextTick = require('./next-tick') - -function AbstractIterator (db) { - if (typeof db !== 'object' || db === null) { - throw new TypeError('First argument must be an abstract-leveldown compliant store') - } - - this.db = db - this._ended = false - this._nexting = false -} - -AbstractIterator.prototype.next = function (callback) { - var self = this - - if (typeof callback !== 'function') { - throw new Error('next() requires a callback argument') - } - - if (self._ended) { - nextTick(callback, new Error('cannot call next() after end()')) - return self - } - - if (self._nexting) { - nextTick(callback, new Error('cannot call next() before previous next() has completed')) - return self - } - - self._nexting = true - self._next(function () { - self._nexting = false - callback.apply(null, arguments) - }) - - return self -} - -AbstractIterator.prototype._next = function (callback) { - nextTick(callback) -} - -AbstractIterator.prototype.seek = function (target) { - if (this._ended) { - throw new Error('cannot call seek() after end()') - } - if (this._nexting) { - throw new Error('cannot call seek() before next() has completed') - } - - target = this.db._serializeKey(target) - this._seek(target) -} - -AbstractIterator.prototype._seek = function (target) {} - -AbstractIterator.prototype.end = function (callback) { - if (typeof callback !== 'function') { - throw new Error('end() requires a callback argument') - } - - if (this._ended) { - return nextTick(callback, new Error('end() already called on iterator')) - } - - this._ended = true - this._end(callback) -} - -AbstractIterator.prototype._end = function (callback) { - nextTick(callback) -} - -// Expose browser-compatible nextTick for dependents -AbstractIterator.prototype._nextTick = nextTick - -module.exports = AbstractIterator diff --git a/node_modules/abstract-leveldown/abstract-leveldown.js b/node_modules/abstract-leveldown/abstract-leveldown.js deleted file mode 100644 index 5039cf3..0000000 --- a/node_modules/abstract-leveldown/abstract-leveldown.js +++ /dev/null @@ -1,320 +0,0 @@ -var xtend = require('xtend') -var supports = require('level-supports') -var Buffer = require('buffer').Buffer -var AbstractIterator = require('./abstract-iterator') -var AbstractChainedBatch = require('./abstract-chained-batch') -var nextTick = require('./next-tick') -var hasOwnProperty = Object.prototype.hasOwnProperty -var rangeOptions = 'start end gt gte lt lte'.split(' ') - -function AbstractLevelDOWN (manifest) { - this.status = 'new' - - // TODO (next major): make this mandatory - this.supports = supports(manifest, { - status: true - }) -} - -AbstractLevelDOWN.prototype.open = function (options, callback) { - var self = this - var oldStatus = this.status - - if (typeof options === 'function') callback = options - - if (typeof callback !== 'function') { - throw new Error('open() requires a callback argument') - } - - if (typeof options !== 'object' || options === null) options = {} - - options.createIfMissing = options.createIfMissing !== false - options.errorIfExists = !!options.errorIfExists - - this.status = 'opening' - this._open(options, function (err) { - if (err) { - self.status = oldStatus - return callback(err) - } - self.status = 'open' - callback() - }) -} - -AbstractLevelDOWN.prototype._open = function (options, callback) { - nextTick(callback) -} - -AbstractLevelDOWN.prototype.close = function (callback) { - var self = this - var oldStatus = this.status - - if (typeof callback !== 'function') { - throw new Error('close() requires a callback argument') - } - - this.status = 'closing' - this._close(function (err) { - if (err) { - self.status = oldStatus - return callback(err) - } - self.status = 'closed' - callback() - }) -} - -AbstractLevelDOWN.prototype._close = function (callback) { - nextTick(callback) -} - -AbstractLevelDOWN.prototype.get = function (key, options, callback) { - if (typeof options === 'function') callback = options - - if (typeof callback !== 'function') { - throw new Error('get() requires a callback argument') - } - - var err = this._checkKey(key) - if (err) return nextTick(callback, err) - - key = this._serializeKey(key) - - if (typeof options !== 'object' || options === null) options = {} - - options.asBuffer = options.asBuffer !== false - - this._get(key, options, callback) -} - -AbstractLevelDOWN.prototype._get = function (key, options, callback) { - nextTick(function () { callback(new Error('NotFound')) }) -} - -AbstractLevelDOWN.prototype.put = function (key, value, options, callback) { - if (typeof options === 'function') callback = options - - if (typeof callback !== 'function') { - throw new Error('put() requires a callback argument') - } - - var err = this._checkKey(key) || this._checkValue(value) - if (err) return nextTick(callback, err) - - key = this._serializeKey(key) - value = this._serializeValue(value) - - if (typeof options !== 'object' || options === null) options = {} - - this._put(key, value, options, callback) -} - -AbstractLevelDOWN.prototype._put = function (key, value, options, callback) { - nextTick(callback) -} - -AbstractLevelDOWN.prototype.del = function (key, options, callback) { - if (typeof options === 'function') callback = options - - if (typeof callback !== 'function') { - throw new Error('del() requires a callback argument') - } - - var err = this._checkKey(key) - if (err) return nextTick(callback, err) - - key = this._serializeKey(key) - - if (typeof options !== 'object' || options === null) options = {} - - this._del(key, options, callback) -} - -AbstractLevelDOWN.prototype._del = function (key, options, callback) { - nextTick(callback) -} - -AbstractLevelDOWN.prototype.batch = function (array, options, callback) { - if (!arguments.length) return this._chainedBatch() - - if (typeof options === 'function') callback = options - - if (typeof array === 'function') callback = array - - if (typeof callback !== 'function') { - throw new Error('batch(array) requires a callback argument') - } - - if (!Array.isArray(array)) { - return nextTick(callback, new Error('batch(array) requires an array argument')) - } - - if (array.length === 0) { - return nextTick(callback) - } - - if (typeof options !== 'object' || options === null) options = {} - - var serialized = new Array(array.length) - - for (var i = 0; i < array.length; i++) { - if (typeof array[i] !== 'object' || array[i] === null) { - return nextTick(callback, new Error('batch(array) element must be an object and not `null`')) - } - - var e = xtend(array[i]) - - if (e.type !== 'put' && e.type !== 'del') { - return nextTick(callback, new Error("`type` must be 'put' or 'del'")) - } - - var err = this._checkKey(e.key) - if (err) return nextTick(callback, err) - - e.key = this._serializeKey(e.key) - - if (e.type === 'put') { - var valueErr = this._checkValue(e.value) - if (valueErr) return nextTick(callback, valueErr) - - e.value = this._serializeValue(e.value) - } - - serialized[i] = e - } - - this._batch(serialized, options, callback) -} - -AbstractLevelDOWN.prototype._batch = function (array, options, callback) { - nextTick(callback) -} - -AbstractLevelDOWN.prototype.clear = function (options, callback) { - if (typeof options === 'function') { - callback = options - } else if (typeof callback !== 'function') { - throw new Error('clear() requires a callback argument') - } - - options = cleanRangeOptions(this, options) - options.reverse = !!options.reverse - options.limit = 'limit' in options ? options.limit : -1 - - this._clear(options, callback) -} - -AbstractLevelDOWN.prototype._clear = function (options, callback) { - // Avoid setupIteratorOptions, would serialize range options a second time. - options.keys = true - options.values = false - options.keyAsBuffer = true - options.valueAsBuffer = true - - var iterator = this._iterator(options) - var emptyOptions = {} - var self = this - - var next = function (err) { - if (err) { - return iterator.end(function () { - callback(err) - }) - } - - iterator.next(function (err, key) { - if (err) return next(err) - if (key === undefined) return iterator.end(callback) - - // This could be optimized by using a batch, but the default _clear - // is not meant to be fast. Implementations have more room to optimize - // if they override _clear. Note: using _del bypasses key serialization. - self._del(key, emptyOptions, next) - }) - } - - next() -} - -AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) { - options = cleanRangeOptions(this, options) - - options.reverse = !!options.reverse - options.keys = options.keys !== false - options.values = options.values !== false - options.limit = 'limit' in options ? options.limit : -1 - options.keyAsBuffer = options.keyAsBuffer !== false - options.valueAsBuffer = options.valueAsBuffer !== false - - return options -} - -function cleanRangeOptions (db, options) { - var result = {} - - for (var k in options) { - if (!hasOwnProperty.call(options, k)) continue - - var opt = options[k] - - if (isRangeOption(k)) { - // Note that we don't reject nullish and empty options here. While - // those types are invalid as keys, they are valid as range options. - opt = db._serializeKey(opt) - } - - result[k] = opt - } - - return result -} - -function isRangeOption (k) { - return rangeOptions.indexOf(k) !== -1 -} - -AbstractLevelDOWN.prototype.iterator = function (options) { - if (typeof options !== 'object' || options === null) options = {} - options = this._setupIteratorOptions(options) - return this._iterator(options) -} - -AbstractLevelDOWN.prototype._iterator = function (options) { - return new AbstractIterator(this) -} - -AbstractLevelDOWN.prototype._chainedBatch = function () { - return new AbstractChainedBatch(this) -} - -AbstractLevelDOWN.prototype._serializeKey = function (key) { - return key -} - -AbstractLevelDOWN.prototype._serializeValue = function (value) { - return value -} - -AbstractLevelDOWN.prototype._checkKey = function (key) { - if (key === null || key === undefined) { - return new Error('key cannot be `null` or `undefined`') - } else if (Buffer.isBuffer(key) && key.length === 0) { - return new Error('key cannot be an empty Buffer') - } else if (key === '') { - return new Error('key cannot be an empty String') - } else if (Array.isArray(key) && key.length === 0) { - return new Error('key cannot be an empty Array') - } -} - -AbstractLevelDOWN.prototype._checkValue = function (value) { - if (value === null || value === undefined) { - return new Error('value cannot be `null` or `undefined`') - } -} - -// Expose browser-compatible nextTick for dependents -AbstractLevelDOWN.prototype._nextTick = nextTick - -module.exports = AbstractLevelDOWN diff --git a/node_modules/abstract-leveldown/index.js b/node_modules/abstract-leveldown/index.js deleted file mode 100644 index 682a79a..0000000 --- a/node_modules/abstract-leveldown/index.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.AbstractLevelDOWN = require('./abstract-leveldown') -exports.AbstractIterator = require('./abstract-iterator') -exports.AbstractChainedBatch = require('./abstract-chained-batch') diff --git a/node_modules/abstract-leveldown/next-tick-browser.js b/node_modules/abstract-leveldown/next-tick-browser.js deleted file mode 100644 index 3e424be..0000000 --- a/node_modules/abstract-leveldown/next-tick-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('immediate') diff --git a/node_modules/abstract-leveldown/next-tick.js b/node_modules/abstract-leveldown/next-tick.js deleted file mode 100644 index 32b4093..0000000 --- a/node_modules/abstract-leveldown/next-tick.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = process.nextTick diff --git a/node_modules/abstract-leveldown/package.json b/node_modules/abstract-leveldown/package.json deleted file mode 100644 index aac722b..0000000 --- a/node_modules/abstract-leveldown/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "abstract-leveldown", - "version": "6.2.3", - "description": "An abstract prototype matching the LevelDOWN API", - "license": "MIT", - "main": "index.js", - "browser": { - "./next-tick.js": "./next-tick-browser.js" - }, - "scripts": { - "test": "standard && hallmark && nyc node test/self.js", - "test-browsers": "airtap --coverage --loopback airtap.local test/self.js", - "test-browser-local": "airtap --coverage --local test/self.js", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "hallmark": "hallmark --fix", - "dependency-check": "dependency-check . test/*.js", - "prepublishOnly": "npm run dependency-check" - }, - "dependencies": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - }, - "devDependencies": { - "airtap": "^3.0.0", - "coveralls": "^3.0.2", - "dependency-check": "^3.3.0", - "hallmark": "^2.0.0", - "level-community": "^3.0.0", - "nyc": "^14.0.0", - "sinon": "^7.2.4", - "standard": "^14.0.0", - "tape": "^4.10.0" - }, - "hallmark": { - "community": "level-community" - }, - "repository": { - "type": "git", - "url": "https://github.com/Level/abstract-leveldown.git" - }, - "homepage": "https://github.com/Level/abstract-leveldown", - "keywords": [ - "level", - "leveldb", - "leveldown", - "levelup" - ], - "engines": { - "node": ">=6" - } -} diff --git a/node_modules/abstract-leveldown/sauce-labs.svg b/node_modules/abstract-leveldown/sauce-labs.svg deleted file mode 100644 index 574cf16..0000000 --- a/node_modules/abstract-leveldown/sauce-labs.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Sauce Labs - - - - - - - - - - - - - - - - diff --git a/node_modules/abstract-leveldown/test/batch-test.js b/node_modules/abstract-leveldown/test/batch-test.js deleted file mode 100644 index 4b2a471..0000000 --- a/node_modules/abstract-leveldown/test/batch-test.js +++ /dev/null @@ -1,318 +0,0 @@ -var db -var verifyNotFoundError = require('./util').verifyNotFoundError -var isTypedArray = require('./util').isTypedArray - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test callback-less, 2-arg, batch() throws', function (t) { - t.throws( - db.batch.bind(db, 'foo', {}), - /Error: batch\(array\) requires a callback argument/, - 'callback-less, 2-arg batch() throws' - ) - t.end() - }) - - test('test batch() with missing `value`', function (t) { - db.batch([{ type: 'put', key: 'foo1' }], function (err) { - t.is(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - t.end() - }) - }) - - test('test batch() with null or undefined `value`', function (t) { - var illegalValues = [null, undefined] - - t.plan(illegalValues.length) - - illegalValues.forEach(function (value) { - db.batch([{ type: 'put', key: 'foo1', value: value }], function (err) { - t.is(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - }) - }) - }) - - test('test batch() with missing `key`', function (t) { - var async = false - - db.batch([{ type: 'put', value: 'foo1' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with null or undefined `key`', function (t) { - var illegalKeys = [null, undefined] - - t.plan(illegalKeys.length * 3) - - illegalKeys.forEach(function (key) { - var async = false - - db.batch([{ type: 'put', key: key, value: 'foo1' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.ok(async, 'callback is asynchronous') - }) - - async = true - }) - }) - - test('test batch() with empty `key`', function (t) { - var illegalKeys = [ - { type: 'String', key: '' }, - { type: 'Buffer', key: Buffer.alloc(0) }, - { type: 'Array', key: [] } - ] - - t.plan(illegalKeys.length * 3) - - illegalKeys.forEach(function (item) { - var async = false - - db.batch([{ type: 'put', key: item.key, value: 'foo1' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'key cannot be an empty ' + item.type, 'correct error message') - t.ok(async, 'callback is asynchronous') - }) - - async = true - }) - }) - - test('test batch() with missing `key` and `value`', function (t) { - var async = false - - db.batch([{ type: 'put' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with missing `type`', function (t) { - var async = false - - db.batch([{ key: 'key', value: 'value' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, "`type` must be 'put' or 'del'", 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with wrong `type`', function (t) { - var async = false - - db.batch([{ key: 'key', value: 'value', type: 'foo' }], function (err) { - t.ok(err, 'got error') - t.equal(err.message, "`type` must be 'put' or 'del'", 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with missing array', function (t) { - var async = false - - db.batch(function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'batch(array) requires an array argument', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with undefined array', function (t) { - var async = false - - db.batch(undefined, function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'batch(array) requires an array argument', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with null array', function (t) { - var async = false - - db.batch(null, function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'batch(array) requires an array argument', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test batch() with null options', function (t) { - db.batch([], null, function (err) { - t.error(err) - t.end() - }) - }) - - ;[null, undefined, 1, true].forEach(function (element) { - var type = element === null ? 'null' : typeof element - - test('test batch() with ' + type + ' element', function (t) { - var async = false - - db.batch([element], function (err) { - t.ok(err, 'got error') - t.equal(err.message, 'batch(array) element must be an object and not `null`', 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - }) - - test('test batch() with empty array', function (t) { - var async = false - - db.batch([], function (err) { - t.error(err, 'no error from batch()') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) -} - -exports.batch = function (test, testCommon) { - test('test simple batch()', function (t) { - db.batch([{ type: 'put', key: 'foo', value: 'bar' }], function (err) { - t.error(err) - - db.get('foo', function (err, value) { - t.error(err) - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer !== 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar') - t.end() - }) - }) - }) - - test('test multiple batch()', function (t) { - db.batch([ - { type: 'put', key: 'foobatch1', value: 'bar1' }, - { type: 'put', key: 'foobatch2', value: 'bar2' }, - { type: 'put', key: 'foobatch3', value: 'bar3' }, - { type: 'del', key: 'foobatch2' } - ], function (err) { - t.error(err) - - var r = 0 - var done = function () { - if (++r === 3) { t.end() } - } - - db.get('foobatch1', function (err, value) { - t.error(err) - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer !== 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar1') - done() - }) - - db.get('foobatch2', function (err, value) { - t.ok(err, 'entry not found') - t.ok(typeof value === 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - done() - }) - - db.get('foobatch3', function (err, value) { - t.error(err) - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer !== 'undefined' && value instanceof Buffer) - result = value.toString() - } - t.equal(result, 'bar3') - done() - }) - }) - }) -} - -exports.atomic = function (test, testCommon) { - test('test multiple batch()', function (t) { - t.plan(4) - - var async = false - - db.batch([ - { type: 'put', key: 'foobah1', value: 'bar1' }, - { type: 'put', value: 'bar2' }, - { type: 'put', key: 'foobah3', value: 'bar3' } - ], function (err) { - t.ok(err, 'should error') - t.ok(async, 'callback is asynchronous') - - db.get('foobah1', function (err) { - t.ok(err, 'should not be found') - }) - db.get('foobah3', function (err) { - t.ok(err, 'should not be found') - }) - }) - - async = true - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.batch(test, testCommon) - exports.atomic(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/chained-batch-test.js b/node_modules/abstract-leveldown/test/chained-batch-test.js deleted file mode 100644 index 6bb2adf..0000000 --- a/node_modules/abstract-leveldown/test/chained-batch-test.js +++ /dev/null @@ -1,298 +0,0 @@ -var collectEntries = require('level-concat-iterator') - -var db - -function collectBatchOps (batch) { - var _put = batch._put - var _del = batch._del - var _operations = [] - - if (typeof _put !== 'function' || typeof _del !== 'function') { - return batch._operations - } - - batch._put = function (key, value) { - _operations.push({ type: 'put', key: key, value: value }) - return _put.apply(this, arguments) - } - - batch._del = function (key) { - _operations.push({ type: 'del', key: key }) - return _del.apply(this, arguments) - } - - return _operations -} - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test batch has db reference', function (t) { - t.ok(db.batch().db === db) - t.end() - }) - - test('test batch#put() with missing `value`', function (t) { - t.plan(1) - - try { - db.batch().put('foo1') - } catch (err) { - t.is(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - } - }) - - test('test batch#put() with missing `key`', function (t) { - try { - db.batch().put(undefined, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null `key`', function (t) { - try { - db.batch().put(null, 'foo1') - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with missing `key` and `value`', function (t) { - try { - db.batch().put() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() with null or undefined `value`', function (t) { - var illegalValues = [null, undefined] - t.plan(illegalValues.length) - - illegalValues.forEach(function (value) { - try { - db.batch().put('key', value) - } catch (err) { - t.is(err.message, 'value cannot be `null` or `undefined`', 'correct error message') - } - }) - }) - - test('test batch#del() with missing `key`', function (t) { - try { - db.batch().del() - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() with null or undefined `key`', function (t) { - var illegalKeys = [null, undefined] - t.plan(illegalKeys.length) - - illegalKeys.forEach(function (key) { - try { - db.batch().del(key) - } catch (err) { - t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') - } - }) - }) - - test('test batch#clear() doesn\'t throw', function (t) { - db.batch().clear() - t.end() - }) - - test('test batch#write() with no callback', function (t) { - try { - db.batch().write() - } catch (err) { - t.equal(err.message, 'write() requires a callback argument', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#put() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.put('boom', 'bang') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#del() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.del('foo') - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#clear() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.clear() - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test batch#write() after write()', function (t) { - var batch = db.batch().put('foo', 'bar') - batch.write(function () {}) - try { - batch.write(function () {}) - } catch (err) { - t.equal(err.message, 'write() already called on this batch', 'correct error message') - return t.end() - } - t.fail('should have thrown') - t.end() - }) - - test('test serialize object', function (t) { - var batch = db.batch() - var ops = collectBatchOps(batch) - - batch - .put({ foo: 'bar' }, { beep: 'boop' }) - .del({ bar: 'baz' }) - ops.forEach(function (op) { - t.ok(op.key, '.key is set for .put and .del operations') - if (op.type === 'put') { - t.ok(op.value, '.value is set for .put operation') - } - }) - t.end() - }) - - test('test custom _serialize*', function (t) { - t.plan(4) - - var _db = Object.create(db) - var batch = _db.batch() - var ops = collectBatchOps(batch) - - _db._serializeKey = function (key) { - t.same(key, { foo: 'bar' }) - return 'key1' - } - - _db._serializeValue = function (value) { - t.same(value, { beep: 'boop' }) - return 'value1' - } - - batch.put({ foo: 'bar' }, { beep: 'boop' }) - - _db._serializeKey = function (key) { - t.same(key, { bar: 'baz' }) - return 'key2' - } - - batch.del({ bar: 'baz' }) - - t.deepEqual(ops, [ - { type: 'put', key: 'key1', value: 'value1' }, - { type: 'del', key: 'key2' } - ]) - }) - - test('test batch#write() with no operations', function (t) { - var async = false - - db.batch().write(function (err) { - t.ifError(err, 'no error from write()') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) -} - -exports.batch = function (test, testCommon) { - test('test basic batch', function (t) { - db.batch([ - { type: 'put', key: 'one', value: '1' }, - { type: 'put', key: 'two', value: '2' }, - { type: 'put', key: 'three', value: '3' } - ], function (err) { - t.error(err) - db.batch() - .put('1', 'one') - .del('2', 'two') - .put('3', 'three') - .clear() - .put('one', 'I') - .put('two', 'II') - .del('three') - .put('foo', 'bar') - .write(function (err) { - t.error(err) - collectEntries( - db.iterator({ keyAsBuffer: false, valueAsBuffer: false }), function (err, data) { - t.error(err) - t.equal(data.length, 3, 'correct number of entries') - var expected = [ - { key: 'foo', value: 'bar' }, - { key: 'one', value: 'I' }, - { key: 'two', value: 'II' } - ] - t.deepEqual(data, expected) - t.end() - } - ) - }) - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.batch(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/clear-range-test.js b/node_modules/abstract-leveldown/test/clear-range-test.js deleted file mode 100644 index 2158631..0000000 --- a/node_modules/abstract-leveldown/test/clear-range-test.js +++ /dev/null @@ -1,258 +0,0 @@ -var concat = require('level-concat-iterator') - -var data = (function () { - var d = [] - var i = 0 - var k - for (; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - d.push({ - key: k, - value: String(Math.random()) - }) - } - return d -}()) - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) -} - -exports.range = function (test, testCommon) { - function rangeTest (name, opts, expected) { - test('db#clear() with ' + name, function (t) { - prepare(t, function (db) { - db.clear(opts, function (err) { - t.ifError(err, 'no clear error') - verify(t, db, expected) - }) - }) - }) - } - - function prepare (t, callback) { - var db = testCommon.factory() - - db.open(function (err) { - t.ifError(err, 'no open error') - - db.batch(data.map(function (d) { - return { - type: 'put', - key: d.key, - value: d.value - } - }), function (err) { - t.ifError(err, 'no batch error') - callback(db) - }) - }) - } - - function verify (t, db, expected) { - var it = db.iterator({ keyAsBuffer: false, valueAsBuffer: false }) - - concat(it, function (err, result) { - t.ifError(err, 'no concat error') - t.is(result.length, expected.length, 'correct number of entries') - t.same(result, expected) - - db.close(t.end.bind(t)) - }) - } - - function exclude (data, start, end, expectedLength) { - data = data.slice() - var removed = data.splice(start, end - start + 1) // Inclusive - if (expectedLength != null) checkLength(removed, expectedLength) - return data - } - - // For sanity checks on test arguments - function checkLength (arr, length) { - if (arr.length !== length) { - throw new RangeError('Expected ' + length + ' elements, got ' + arr.length) - } - - return arr - } - - rangeTest('full range', {}, []) - - // Reversing has no effect without limit - rangeTest('reverse=true', { - reverse: true - }, []) - - rangeTest('gte=00', { - gte: '00' - }, []) - - rangeTest('gte=50', { - gte: '50' - }, data.slice(0, 50)) - - rangeTest('lte=50 and reverse=true', { - lte: '50', - reverse: true - }, data.slice(51)) - - rangeTest('gte=49.5 (midway)', { - gte: '49.5' - }, data.slice(0, 50)) - - rangeTest('gte=49999 (midway)', { - gte: '49999' - }, data.slice(0, 50)) - - rangeTest('lte=49.5 (midway) and reverse=true', { - lte: '49.5', - reverse: true - }, data.slice(50)) - - rangeTest('lt=49.5 (midway) and reverse=true', { - lt: '49.5', - reverse: true - }, data.slice(50)) - - rangeTest('lt=50 and reverse=true', { - lt: '50', - reverse: true - }, data.slice(50)) - - rangeTest('lte=50', { - lte: '50' - }, data.slice(51)) - - rangeTest('lte=50.5 (midway)', { - lte: '50.5' - }, data.slice(51)) - - rangeTest('lte=50555 (midway)', { - lte: '50555' - }, data.slice(51)) - - rangeTest('lt=50555 (midway)', { - lt: '50555' - }, data.slice(51)) - - rangeTest('gte=50.5 (midway) and reverse=true', { - gte: '50.5', - reverse: true - }, data.slice(0, 51)) - - rangeTest('gt=50.5 (midway) and reverse=true', { - gt: '50.5', - reverse: true - }, data.slice(0, 51)) - - rangeTest('gt=50 and reverse=true', { - gt: '50', - reverse: true - }, data.slice(0, 51)) - - // Starting key is actually '00' so it should avoid it - rangeTest('lte=0', { - lte: '0' - }, data) - - // Starting key is actually '00' so it should avoid it - rangeTest('lt=0', { - lt: '0' - }, data) - - rangeTest('gte=30 and lte=70', { - gte: '30', - lte: '70' - }, exclude(data, 30, 70)) - - rangeTest('gt=29 and lt=71', { - gt: '29', - lt: '71' - }, exclude(data, 30, 70)) - - rangeTest('gte=30 and lte=70 and reverse=true', { - lte: '70', - gte: '30', - reverse: true - }, exclude(data, 30, 70)) - - rangeTest('gt=29 and lt=71 and reverse=true', { - lt: '71', - gt: '29', - reverse: true - }, exclude(data, 30, 70)) - - rangeTest('limit=20', { - limit: 20 - }, data.slice(20)) - - rangeTest('limit=20 and gte=20', { - limit: 20, - gte: '20' - }, exclude(data, 20, 39, 20)) - - rangeTest('limit=20 and reverse=true', { - limit: 20, - reverse: true - }, data.slice(0, -20)) - - rangeTest('limit=20 and lte=79 and reverse=true', { - limit: 20, - lte: '79', - reverse: true - }, exclude(data, 60, 79, 20)) - - rangeTest('limit=-1 should clear whole database', { - limit: -1 - }, []) - - rangeTest('limit=0 should not clear anything', { - limit: 0 - }, data) - - rangeTest('lte after limit', { - limit: 20, - lte: '50' - }, data.slice(20)) - - rangeTest('lte before limit', { - limit: 50, - lte: '19' - }, data.slice(20)) - - rangeTest('gte after database end', { - gte: '9a' - }, data) - - rangeTest('gt after database end', { - gt: '9a' - }, data) - - rangeTest('lte after database end and reverse=true', { - lte: '9a', - reverse: true - }, []) - - rangeTest('lte and gte after database and reverse=true', { - lte: '9b', - gte: '9a', - reverse: true - }, data) - - rangeTest('lt and gt after database and reverse=true', { - lt: '9b', - gt: '9a', - reverse: true - }, data) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.range(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/clear-test.js b/node_modules/abstract-leveldown/test/clear-test.js deleted file mode 100644 index d338cad..0000000 --- a/node_modules/abstract-leveldown/test/clear-test.js +++ /dev/null @@ -1,83 +0,0 @@ -var concat = require('level-concat-iterator') -var db - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test argument-less clear() throws', function (t) { - t.throws( - db.clear.bind(db), - /Error: clear\(\) requires a callback argument/, - 'no-arg clear() throws' - ) - t.end() - }) -} - -exports.clear = function (test, testCommon) { - makeTest('string', ['a', 'b']) - - if (testCommon.bufferKeys) { - makeTest('buffer', [Buffer.from('a'), Buffer.from('b')]) - makeTest('mixed', [Buffer.from('a'), 'b']) - - // These keys would be equal when compared as utf8 strings - makeTest('non-utf8 buffer', [Buffer.from('80', 'hex'), Buffer.from('c0', 'hex')]) - } - - function makeTest (type, keys) { - test('test simple clear() on ' + type + ' keys', function (t) { - t.plan(8) - - var db = testCommon.factory() - var ops = keys.map(function (key) { - return { type: 'put', key: key, value: 'foo' } - }) - - db.open(function (err) { - t.ifError(err, 'no open error') - - db.batch(ops, function (err) { - t.ifError(err, 'no batch error') - - concat(db.iterator(), function (err, entries) { - t.ifError(err, 'no concat error') - t.is(entries.length, keys.length, 'has entries') - - db.clear(function (err) { - t.ifError(err, 'no clear error') - - concat(db.iterator(), function (err, entries) { - t.ifError(err, 'no concat error') - t.is(entries.length, 0, 'has no entries') - - db.close(function (err) { - t.ifError(err, 'no close error') - }) - }) - }) - }) - }) - }) - }) - } -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.clear(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/close-test.js b/node_modules/abstract-leveldown/test/close-test.js deleted file mode 100644 index d70a06f..0000000 --- a/node_modules/abstract-leveldown/test/close-test.js +++ /dev/null @@ -1,39 +0,0 @@ -var db - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.close = function (test, testCommon) { - test('test close()', function (t) { - t.throws( - db.close.bind(db), - /Error: close\(\) requires a callback argument/, - 'no-arg close() throws' - ) - t.throws( - db.close.bind(db, 'foo'), - /Error: close\(\) requires a callback argument/, - 'non-callback close() throws' - ) - - db.close(function (err) { - t.error(err) - t.end() - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.close(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/common.js b/node_modules/abstract-leveldown/test/common.js deleted file mode 100644 index cdc216b..0000000 --- a/node_modules/abstract-leveldown/test/common.js +++ /dev/null @@ -1,37 +0,0 @@ -function testCommon (options) { - var factory = options.factory - var test = options.test - - if (typeof factory !== 'function') { - throw new TypeError('factory must be a function') - } - - if (typeof test !== 'function') { - throw new TypeError('test must be a function') - } - - return { - test: test, - factory: factory, - - // TODO (next major): remove - setUp: options.setUp || noopTest(), - tearDown: options.tearDown || noopTest(), - - // TODO (next major): use db.supports instead - bufferKeys: options.bufferKeys !== false, - createIfMissing: options.createIfMissing !== false, - errorIfExists: options.errorIfExists !== false, - snapshots: options.snapshots !== false, - seek: options.seek !== false, - clear: !!options.clear - } -} - -function noopTest () { - return function (t) { - t.end() - } -} - -module.exports = testCommon diff --git a/node_modules/abstract-leveldown/test/del-test.js b/node_modules/abstract-leveldown/test/del-test.js deleted file mode 100644 index 9dbea61..0000000 --- a/node_modules/abstract-leveldown/test/del-test.js +++ /dev/null @@ -1,92 +0,0 @@ -var db -var verifyNotFoundError = require('./util').verifyNotFoundError - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test argument-less del() throws', function (t) { - t.throws( - db.del.bind(db), - /Error: del\(\) requires a callback argument/, - 'no-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo'), - /Error: del\(\) requires a callback argument/, - 'callback-less, 1-arg del() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, del() throws', function (t) { - t.throws( - db.del.bind(db, 'foo', {}), - /Error: del\(\) requires a callback argument/, - 'callback-less, 2-arg del() throws' - ) - t.end() - }) - - test('test custom _serialize*', function (t) { - t.plan(3) - var db = testCommon.factory() - db._serializeKey = function (data) { return data } - db._del = function (key, options, callback) { - t.deepEqual(key, { foo: 'bar' }) - process.nextTick(callback) - } - db.open(function () { - db.del({ foo: 'bar' }, function (err) { - t.error(err) - db.close(t.error.bind(t)) - }) - }) - }) -} - -exports.del = function (test, testCommon) { - test('test simple del()', function (t) { - db.put('foo', 'bar', function (err) { - t.error(err) - db.del('foo', function (err) { - t.error(err) - db.get('foo', function (err, value) { - t.ok(err, 'entry properly deleted') - t.ok(typeof value === 'undefined', 'value is undefined') - t.ok(verifyNotFoundError(err), 'NotFound error') - t.end() - }) - }) - }) - }) - - test('test del on non-existent key', function (t) { - db.del('blargh', function (err) { - t.error(err) - t.end() - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.del(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/factory-test.js b/node_modules/abstract-leveldown/test/factory-test.js deleted file mode 100644 index 4e1413f..0000000 --- a/node_modules/abstract-leveldown/test/factory-test.js +++ /dev/null @@ -1,37 +0,0 @@ -var concat = require('level-concat-iterator') - -module.exports = function (test, testCommon) { - test('setUp common', testCommon.setUp) - - test('testCommon.factory() returns a unique database', function (t) { - var db1 = testCommon.factory() - var db2 = testCommon.factory() - - function close () { - db1.close(function (err) { - t.error(err, 'no error while closing db1') - db2.close(function (err) { - t.error(err, 'no error while closing db2') - t.end() - }) - }) - } - - db1.open(function (err) { - t.error(err, 'no error while opening db1') - db2.open(function (err) { - t.error(err, 'no error while opening db2') - db1.put('key', 'value', function (err) { - t.error(err, 'put key in db1') - concat(db2.iterator(), function (err, entries) { - t.error(err, 'got items from db2') - t.same(entries, [], 'db2 should be empty') - close() - }) - }) - }) - }) - }) - - test('tearDown', testCommon.tearDown) -} diff --git a/node_modules/abstract-leveldown/test/get-test.js b/node_modules/abstract-leveldown/test/get-test.js deleted file mode 100644 index 8b5190f..0000000 --- a/node_modules/abstract-leveldown/test/get-test.js +++ /dev/null @@ -1,169 +0,0 @@ -var db -var verifyNotFoundError = require('./util').verifyNotFoundError -var isTypedArray = require('./util').isTypedArray - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test argument-less get() throws', function (t) { - t.throws( - db.get.bind(db), - /Error: get\(\) requires a callback argument/, - 'no-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo'), - /Error: get\(\) requires a callback argument/, - 'callback-less, 1-arg get() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, get() throws', function (t) { - t.throws( - db.get.bind(db, 'foo', {}), - /Error: get\(\) requires a callback argument/, - 'callback-less, 2-arg get() throws' - ) - t.end() - }) - - test('test custom _serialize*', function (t) { - t.plan(3) - var db = testCommon.factory() - db._serializeKey = function (data) { return data } - db._get = function (key, options, callback) { - t.deepEqual(key, { foo: 'bar' }) - process.nextTick(callback) - } - db.open(function () { - db.get({ foo: 'bar' }, function (err) { - t.error(err) - db.close(t.error.bind(t)) - }) - }) - }) -} - -exports.get = function (test, testCommon) { - test('test simple get()', function (t) { - db.put('foo', 'bar', function (err) { - t.error(err) - db.get('foo', function (err, value) { - t.error(err) - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer !== 'undefined' && value instanceof Buffer) - try { - result = value.toString() - } catch (e) { - t.error(e, 'should not throw when converting value to a string') - } - } - - t.equal(result, 'bar') - - db.get('foo', {}, function (err, value) { // same but with {} - t.error(err) - t.ok(typeof value !== 'string', 'should not be string by default') - - var result - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } else { - t.ok(typeof Buffer !== 'undefined' && value instanceof Buffer) - try { - result = value.toString() - } catch (e) { - t.error(e, 'should not throw when converting value to a string') - } - } - - t.equal(result, 'bar') - - db.get('foo', { asBuffer: false }, function (err, value) { - t.error(err) - t.ok(typeof value === 'string', 'should be string if not buffer') - t.equal(value, 'bar') - t.end() - }) - }) - }) - }) - }) - - test('test simultaniously get()', function (t) { - db.put('hello', 'world', function (err) { - t.error(err) - var r = 0 - var done = function () { - if (++r === 20) { t.end() } - } - var i = 0 - var j = 0 - - for (; i < 10; ++i) { - db.get('hello', function (err, value) { - t.error(err) - t.equal(value.toString(), 'world') - done() - }) - } - - for (; j < 10; ++j) { - db.get('not found', function (err, value) { - t.ok(err, 'should error') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value === 'undefined', 'value is undefined') - done() - }) - } - }) - }) - - test('test get() not found error is asynchronous', function (t) { - t.plan(5) - - db.put('hello', 'world', function (err) { - t.error(err) - - var async = false - - db.get('not found', function (err, value) { - t.ok(err, 'should error') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.ok(typeof value === 'undefined', 'value is undefined') - t.ok(async, 'callback is asynchronous') - }) - - async = true - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.get(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/index.js b/node_modules/abstract-leveldown/test/index.js deleted file mode 100644 index 1ef97af..0000000 --- a/node_modules/abstract-leveldown/test/index.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('./common') - -function suite (options) { - var testCommon = common(options) - var test = testCommon.test - - require('./factory-test')(test, testCommon) - require('./manifest-test')(test, testCommon) - - require('./leveldown-test')(test, testCommon) - require('./open-test').all(test, testCommon) - require('./close-test').all(test, testCommon) - - if (testCommon.createIfMissing) { - require('./open-create-if-missing-test').all(test, testCommon) - } - - if (testCommon.errorIfExists) { - require('./open-error-if-exists-test').all(test, testCommon) - } - - require('./put-test').all(test, testCommon) - require('./get-test').all(test, testCommon) - require('./del-test').all(test, testCommon) - require('./put-get-del-test').all(test, testCommon) - - require('./batch-test').all(test, testCommon) - require('./chained-batch-test').all(test, testCommon) - - require('./iterator-test').all(test, testCommon) - require('./iterator-range-test').all(test, testCommon) - - if (testCommon.seek) { - require('./iterator-seek-test').all(test, testCommon) - } - - if (testCommon.snapshots) { - require('./iterator-snapshot-test').all(test, testCommon) - } else { - require('./iterator-no-snapshot-test').all(test, testCommon) - } - - if (testCommon.clear) { - require('./clear-test').all(test, testCommon) - require('./clear-range-test').all(test, testCommon) - } -} - -suite.common = common -module.exports = suite diff --git a/node_modules/abstract-leveldown/test/iterator-no-snapshot-test.js b/node_modules/abstract-leveldown/test/iterator-no-snapshot-test.js deleted file mode 100644 index c90df90..0000000 --- a/node_modules/abstract-leveldown/test/iterator-no-snapshot-test.js +++ /dev/null @@ -1,72 +0,0 @@ -var collectEntries = require('level-concat-iterator') - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) -} - -exports.noSnapshot = function (test, testCommon) { - function make (run) { - return function (t) { - var db = testCommon.factory() - var operations = [ - { type: 'put', key: 'a', value: 'a' }, - { type: 'put', key: 'b', value: 'b' }, - { type: 'put', key: 'c', value: 'c' } - ] - - db.open(function (err) { - t.ifError(err, 'no open error') - - db.batch(operations, function (err) { - t.ifError(err, 'no batch error') - - // For this test it is important that we don't read eagerly. - // NOTE: highWaterMark is not an abstract option atm, but - // it is supported by leveldown, rocksdb and others. - var it = db.iterator({ highWaterMark: 0 }) - - run(db, function (err) { - t.ifError(err, 'no run error') - verify(t, it, db) - }) - }) - }) - } - } - - function verify (t, it, db) { - collectEntries(it, function (err, entries) { - t.ifError(err, 'no iterator error') - - var kv = entries.map(function (entry) { - return entry.key.toString() + entry.value.toString() - }) - - if (kv.length === 3) { - t.same(kv, ['aa', 'bb', 'cc'], 'maybe supports snapshots') - } else { - t.same(kv, ['aa', 'cc'], 'ignores keys that have been deleted in the mean time') - } - - db.close(t.end.bind(t)) - }) - } - - test('delete key after creating iterator', make(function (db, done) { - db.del('b', done) - })) - - test('batch delete key after creating iterator', make(function (db, done) { - db.batch([{ type: 'del', key: 'b' }], done) - })) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.noSnapshot(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/iterator-range-test.js b/node_modules/abstract-leveldown/test/iterator-range-test.js deleted file mode 100644 index 3d5c090..0000000 --- a/node_modules/abstract-leveldown/test/iterator-range-test.js +++ /dev/null @@ -1,381 +0,0 @@ -var collectEntries = require('level-concat-iterator') -var xtend = require('xtend') - -var db - -var data = (function () { - var d = [] - var i = 0 - var k - for (; i < 100; i++) { - k = (i < 10 ? '0' : '') + i - d.push({ - key: k, - value: String(Math.random()) - }) - } - return d -}()) - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(function () { - db.batch(data.map(function (d) { - return { - type: 'put', - key: d.key, - value: d.value - } - }), t.end.bind(t)) - }) - }) -} - -exports.range = function (test, testCommon) { - function rangeTest (name, opts, expected) { - opts.keyAsBuffer = false - opts.valueAsBuffer = false - test(name, function (t) { - collectEntries(db.iterator(opts), function (err, result) { - t.error(err) - t.is(result.length, expected.length, 'correct number of entries') - t.same(result, expected) - t.end() - }) - }) - - // Test the documented promise that in reverse mode, - // "the returned entries are the same, but in reverse". - if (!opts.reverse && !('limit' in opts)) { - var reverseOpts = xtend(opts, { reverse: true }) - - // Swap start & end options - if (('start' in opts) && ('end' in opts)) { - reverseOpts.end = opts.start - reverseOpts.start = opts.end - } else if ('start' in opts) { - reverseOpts.end = opts.start - delete reverseOpts.start - } else if ('end' in opts) { - reverseOpts.start = opts.end - delete reverseOpts.end - } - - rangeTest( - name + ' (flipped)', - reverseOpts, - expected.slice().reverse() - ) - } - } - - rangeTest('test full data collection', {}, data) - - rangeTest('test iterator with reverse=true', { - reverse: true - }, data.slice().reverse()) - - rangeTest('test iterator with gte=00', { - gte: '00' - }, data) - - rangeTest('test iterator with start=00 - legacy', { - start: '00' - }, data) - - rangeTest('test iterator with gte=50', { - gte: '50' - }, data.slice(50)) - - rangeTest('test iterator with start=50 - legacy', { - start: '50' - }, data.slice(50)) - - rangeTest('test iterator with lte=50 and reverse=true', { - lte: '50', - reverse: true - }, data.slice().reverse().slice(49)) - - rangeTest('test iterator with start=50 and reverse=true - legacy', { - start: '50', - reverse: true - }, data.slice().reverse().slice(49)) - - rangeTest('test iterator with gte=49.5 (midway)', { - gte: '49.5' - }, data.slice(50)) - - rangeTest('test iterator with start=49.5 (midway) - legacy', { - start: '49.5' - }, data.slice(50)) - - rangeTest('test iterator with gte=49999 (midway)', { - gte: '49999' - }, data.slice(50)) - - rangeTest('test iterator with start=49999 (midway) - legacy', { - start: '49999' - }, data.slice(50)) - - rangeTest('test iterator with lte=49.5 (midway) and reverse=true', { - lte: '49.5', - reverse: true - }, data.slice().reverse().slice(50)) - - rangeTest('test iterator with lt=49.5 (midway) and reverse=true', { - lt: '49.5', - reverse: true - }, data.slice().reverse().slice(50)) - - rangeTest('test iterator with lt=50 and reverse=true', { - lt: '50', - reverse: true - }, data.slice().reverse().slice(50)) - - rangeTest('test iterator with start=49.5 (midway) and reverse=true - legacy', { - start: '49.5', - reverse: true - }, data.slice().reverse().slice(50)) - - rangeTest('test iterator with lte=50', { - lte: '50' - }, data.slice(0, 51)) - - rangeTest('test iterator with end=50 - legacy', { - end: '50' - }, data.slice(0, 51)) - - rangeTest('test iterator with lte=50.5 (midway)', { - lte: '50.5' - }, data.slice(0, 51)) - - rangeTest('test iterator with end=50.5 (midway) - legacy', { - end: '50.5' - }, data.slice(0, 51)) - - rangeTest('test iterator with lte=50555 (midway)', { - lte: '50555' - }, data.slice(0, 51)) - - rangeTest('test iterator with lt=50555 (midway)', { - lt: '50555' - }, data.slice(0, 51)) - - rangeTest('test iterator with end=50555 (midway) - legacy', { - end: '50555' - }, data.slice(0, 51)) - - rangeTest('test iterator with gte=50.5 (midway) and reverse=true', { - gte: '50.5', - reverse: true - }, data.slice().reverse().slice(0, 49)) - - rangeTest('test iterator with gt=50.5 (midway) and reverse=true', { - gt: '50.5', - reverse: true - }, data.slice().reverse().slice(0, 49)) - - rangeTest('test iterator with end=50.5 (midway) and reverse=true - legacy', { - end: '50.5', - reverse: true - }, data.slice().reverse().slice(0, 49)) - - rangeTest('test iterator with gt=50 and reverse=true', { - gt: '50', - reverse: true - }, data.slice().reverse().slice(0, 49)) - - // end='0', starting key is actually '00' so it should avoid it - rangeTest('test iterator with lte=0', { - lte: '0' - }, []) - - // end='0', starting key is actually '00' so it should avoid it - rangeTest('test iterator with lt=0', { - lt: '0' - }, []) - - // end='0', starting key is actually '00' so it should avoid it - rangeTest('test iterator with end=0 - legacy', { - end: '0' - }, []) - - rangeTest('test iterator with gte=30 and lte=70', { - gte: '30', - lte: '70' - }, data.slice(30, 71)) - - rangeTest('test iterator with gt=29 and lt=71', { - gt: '29', - lt: '71' - }, data.slice(30, 71)) - - rangeTest('test iterator with start=30 and end=70 - legacy', { - start: '30', - end: '70' - }, data.slice(30, 71)) - - rangeTest('test iterator with gte=30 and lte=70 and reverse=true', { - lte: '70', - gte: '30', - reverse: true - }, data.slice().reverse().slice(29, 70)) - - rangeTest('test iterator with gt=29 and lt=71 and reverse=true', { - lt: '71', - gt: '29', - reverse: true - }, data.slice().reverse().slice(29, 70)) - - rangeTest('test iterator with start=70 and end=30 and reverse=true - legacy', { - start: '70', - end: '30', - reverse: true - }, data.slice().reverse().slice(29, 70)) - - rangeTest('test iterator with limit=20', { - limit: 20 - }, data.slice(0, 20)) - - rangeTest('test iterator with limit=20 and gte=20', { - limit: 20, - gte: '20' - }, data.slice(20, 40)) - - rangeTest('test iterator with limit=20 and start=20 - legacy', { - limit: 20, - start: '20' - }, data.slice(20, 40)) - - rangeTest('test iterator with limit=20 and reverse=true', { - limit: 20, - reverse: true - }, data.slice().reverse().slice(0, 20)) - - rangeTest('test iterator with limit=20 and lte=79 and reverse=true', { - limit: 20, - lte: '79', - reverse: true - }, data.slice().reverse().slice(20, 40)) - - rangeTest('test iterator with limit=20 and start=79 and reverse=true - legacy', { - limit: 20, - start: '79', - reverse: true - }, data.slice().reverse().slice(20, 40)) - - // the default limit value from levelup is -1 - rangeTest('test iterator with limit=-1 should iterate over whole database', { - limit: -1 - }, data) - - rangeTest('test iterator with limit=0 should not iterate over anything', { - limit: 0 - }, []) - - rangeTest('test iterator with lte after limit', { - limit: 20, - lte: '50' - }, data.slice(0, 20)) - - rangeTest('test iterator with end after limit - legacy', { - limit: 20, - end: '50' - }, data.slice(0, 20)) - - rangeTest('test iterator with lte before limit', { - limit: 50, - lte: '19' - }, data.slice(0, 20)) - - rangeTest('test iterator with end before limit - legacy', { - limit: 50, - end: '19' - }, data.slice(0, 20)) - - rangeTest('test iterator with gte after database end', { - gte: '9a' - }, []) - - rangeTest('test iterator with gt after database end', { - gt: '9a' - }, []) - - rangeTest('test iterator with start after database end - legacy', { - start: '9a' - }, []) - - rangeTest('test iterator with lte after database end and reverse=true', { - lte: '9a', - reverse: true - }, data.slice().reverse()) - - rangeTest('test iterator with start after database end and reverse=true - legacy', { - start: '9a', - reverse: true - }, data.slice().reverse()) - - rangeTest('test iterator with lt after database end', { - lt: 'a' - }, data.slice()) - - rangeTest('test iterator with end after database end - legacy', { - end: 'a' - }, data.slice()) - - rangeTest('test iterator with lt at database end', { - lt: data[data.length - 1].key - }, data.slice(0, -1)) - - rangeTest('test iterator with lte at database end', { - lte: data[data.length - 1].key - }, data.slice()) - - rangeTest('test iterator with end at database end - legacy', { - end: data[data.length - 1].key - }, data.slice()) - - rangeTest('test iterator with lt before database end', { - lt: data[data.length - 2].key - }, data.slice(0, -2)) - - rangeTest('test iterator with lte before database end', { - lte: data[data.length - 2].key - }, data.slice(0, -1)) - - rangeTest('test iterator with end before database end - legacy', { - end: data[data.length - 2].key - }, data.slice(0, -1)) - - rangeTest('test iterator with lte and gte after database and reverse=true', { - lte: '9b', - gte: '9a', - reverse: true - }, []) - - rangeTest('test iterator with lt and gt after database and reverse=true', { - lt: '9b', - gt: '9a', - reverse: true - }, []) - - rangeTest('test iterator with start and end after database and reverse=true - legacy', { - start: '9b', - end: '9a', - reverse: true - }, []) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.range(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/iterator-seek-test.js b/node_modules/abstract-leveldown/test/iterator-seek-test.js deleted file mode 100644 index d153c9a..0000000 --- a/node_modules/abstract-leveldown/test/iterator-seek-test.js +++ /dev/null @@ -1,281 +0,0 @@ -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.sequence(test, testCommon) - exports.seek(test, testCommon) - exports.tearDown(test, testCommon) -} - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) -} - -exports.sequence = function (test, testCommon) { - function make (name, testFn) { - test(name, function (t) { - var db = testCommon.factory() - var done = function (err) { - t.error(err, 'no error from done()') - - db.close(function (err) { - t.error(err, 'no error from close()') - t.end() - }) - } - - db.open(function (err) { - t.error(err, 'no error from open()') - testFn(db, t, done) - }) - }) - } - - make('iterator#seek() throws if next() has not completed', function (db, t, done) { - var ite = db.iterator() - var error - var async = false - - ite.next(function (err, key, value) { - t.error(err, 'no error from next()') - t.ok(async, 'next is asynchronous') - ite.end(done) - }) - - async = true - - try { - ite.seek('two') - } catch (err) { - error = err.message - } - - t.is(error, 'cannot call seek() before next() has completed', 'got error') - }) - - make('iterator#seek() throws after end()', function (db, t, done) { - var ite = db.iterator() - - // TODO: why call next? Can't we end immediately? - ite.next(function (err, key, value) { - t.error(err, 'no error from next()') - - ite.end(function (err) { - t.error(err, 'no error from end()') - var error - - try { - ite.seek('two') - } catch (err) { - error = err.message - } - - t.is(error, 'cannot call seek() after end()', 'got error') - done() - }) - }) - }) -} - -exports.seek = function (test, testCommon) { - function make (name, testFn) { - test(name, function (t) { - var db = testCommon.factory() - var done = function (err) { - t.error(err, 'no error from done()') - - db.close(function (err) { - t.error(err, 'no error from close()') - t.end() - }) - } - - db.open(function (err) { - t.error(err, 'no error from open()') - - db.batch([ - { type: 'put', key: 'one', value: '1' }, - { type: 'put', key: 'two', value: '2' }, - { type: 'put', key: 'three', value: '3' } - ], function (err) { - t.error(err, 'no error from batch()') - testFn(db, t, done) - }) - }) - }) - } - - make('iterator#seek() to string target', function (db, t, done) { - var ite = db.iterator() - ite.seek('two') - ite.next(function (err, key, value) { - t.error(err, 'no error') - t.same(key.toString(), 'two', 'key matches') - t.same(value.toString(), '2', 'value matches') - ite.next(function (err, key, value) { - t.error(err, 'no error') - t.same(key, undefined, 'end of iterator') - t.same(value, undefined, 'end of iterator') - ite.end(done) - }) - }) - }) - - if (testCommon.bufferKeys) { - make('iterator#seek() to buffer target', function (db, t, done) { - var ite = db.iterator() - ite.seek(Buffer.from('two')) - ite.next(function (err, key, value) { - t.error(err, 'no error from next()') - t.equal(key.toString(), 'two', 'key matches') - t.equal(value.toString(), '2', 'value matches') - ite.next(function (err, key, value) { - t.error(err, 'no error from next()') - t.equal(key, undefined, 'end of iterator') - t.equal(value, undefined, 'end of iterator') - ite.end(done) - }) - }) - }) - } - - make('iterator#seek() on reverse iterator', function (db, t, done) { - var ite = db.iterator({ reverse: true, limit: 1 }) - ite.seek('three!') - ite.next(function (err, key, value) { - t.error(err, 'no error') - t.same(key.toString(), 'three', 'key matches') - t.same(value.toString(), '3', 'value matches') - ite.end(done) - }) - }) - - make('iterator#seek() to out of range target', function (db, t, done) { - var ite = db.iterator() - ite.seek('zzz') - ite.next(function (err, key, value) { - t.error(err, 'no error') - t.same(key, undefined, 'end of iterator') - t.same(value, undefined, 'end of iterator') - ite.end(done) - }) - }) - - make('iterator#seek() on reverse iterator to out of range target', function (db, t, done) { - var ite = db.iterator({ reverse: true }) - ite.seek('zzz') - ite.next(function (err, key, value) { - t.error(err, 'no error') - t.same(key.toString(), 'two') - t.same(value.toString(), '2') - ite.end(done) - }) - }) - - test('iterator#seek() respects range', function (t) { - var db = testCommon.factory() - - db.open(function (err) { - t.error(err, 'no error from open()') - - // Can't use Array.fill() because IE - var ops = [] - - for (var i = 0; i < 10; i++) { - ops.push({ type: 'put', key: String(i), value: String(i) }) - } - - db.batch(ops, function (err) { - t.error(err, 'no error from batch()') - - var pending = 0 - - expect({ gt: '5' }, '4', undefined) - expect({ gt: '5' }, '5', undefined) - expect({ gt: '5' }, '6', '6') - - expect({ gte: '5' }, '4', undefined) - expect({ gte: '5' }, '5', '5') - expect({ gte: '5' }, '6', '6') - - expect({ start: '5' }, '4', undefined) - expect({ start: '5' }, '5', '5') - expect({ start: '5' }, '6', '6') - - expect({ lt: '5' }, '4', '4') - expect({ lt: '5' }, '5', undefined) - expect({ lt: '5' }, '6', undefined) - - expect({ lte: '5' }, '4', '4') - expect({ lte: '5' }, '5', '5') - expect({ lte: '5' }, '6', undefined) - - expect({ end: '5' }, '4', '4') - expect({ end: '5' }, '5', '5') - expect({ end: '5' }, '6', undefined) - - expect({ lt: '5', reverse: true }, '4', '4') - expect({ lt: '5', reverse: true }, '5', undefined) - expect({ lt: '5', reverse: true }, '6', undefined) - - expect({ lte: '5', reverse: true }, '4', '4') - expect({ lte: '5', reverse: true }, '5', '5') - expect({ lte: '5', reverse: true }, '6', undefined) - - expect({ start: '5', reverse: true }, '4', '4') - expect({ start: '5', reverse: true }, '5', '5') - expect({ start: '5', reverse: true }, '6', undefined) - - expect({ gt: '5', reverse: true }, '4', undefined) - expect({ gt: '5', reverse: true }, '5', undefined) - expect({ gt: '5', reverse: true }, '6', '6') - - expect({ gte: '5', reverse: true }, '4', undefined) - expect({ gte: '5', reverse: true }, '5', '5') - expect({ gte: '5', reverse: true }, '6', '6') - - expect({ end: '5', reverse: true }, '4', undefined) - expect({ end: '5', reverse: true }, '5', '5') - expect({ end: '5', reverse: true }, '6', '6') - - expect({ gt: '7', lt: '8' }, '7', undefined) - expect({ gte: '7', lt: '8' }, '7', '7') - expect({ gte: '7', lt: '8' }, '8', undefined) - expect({ gt: '7', lte: '8' }, '8', '8') - - function expect (range, target, expected) { - pending++ - var ite = db.iterator(range) - - ite.seek(target) - ite.next(function (err, key, value) { - t.error(err, 'no error from next()') - - var json = JSON.stringify(range) - var msg = 'seek(' + target + ') on ' + json + ' yields ' + expected - - if (expected === undefined) { - t.equal(value, undefined, msg) - } else { - t.equal(value.toString(), expected, msg) - } - - ite.end(function (err) { - t.error(err, 'no error from end()') - if (!--pending) done() - }) - }) - } - - function done () { - db.close(function (err) { - t.error(err, 'no error from close()') - t.end() - }) - } - }) - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} diff --git a/node_modules/abstract-leveldown/test/iterator-snapshot-test.js b/node_modules/abstract-leveldown/test/iterator-snapshot-test.js deleted file mode 100644 index 7c022b0..0000000 --- a/node_modules/abstract-leveldown/test/iterator-snapshot-test.js +++ /dev/null @@ -1,89 +0,0 @@ -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) -} - -exports.snapshot = function (test, testCommon) { - function make (run) { - return function (t) { - var db = testCommon.factory() - - db.open(function (err) { - t.ifError(err, 'no open error') - - db.put('z', 'from snapshot', function (err) { - t.ifError(err, 'no put error') - - // For this test it is important that we don't read eagerly. - // NOTE: highWaterMark is not an abstract option atm, but - // it is supported by leveldown, rocksdb and others. - var it = db.iterator({ highWaterMark: 0 }) - - run(t, db, it, function end (err) { - t.ifError(err, 'no run error') - - it.end(function (err) { - t.ifError(err, 'no iterator end error') - db.close(t.end.bind(t)) - }) - }) - }) - }) - } - } - - test('delete key after snapshotting', make(function (t, db, it, end) { - db.del('z', function (err) { - t.ifError(err, 'no del error') - - it.next(function (err, key, value) { - t.ifError(err, 'no next error') - t.ok(key, 'got a key') - t.is(key.toString(), 'z', 'correct key') - t.is(value.toString(), 'from snapshot', 'correct value') - - end() - }) - }) - })) - - test('overwrite key after snapshotting', make(function (t, db, it, end) { - db.put('z', 'not from snapshot', function (err) { - t.ifError(err, 'no put error') - - it.next(function (err, key, value) { - t.ifError(err, 'no next error') - t.ok(key, 'got a key') - t.is(key.toString(), 'z', 'correct key') - t.is(value.toString(), 'from snapshot', 'correct value') - - end() - }) - }) - })) - - test('add key after snapshotting that sorts first', make(function (t, db, it, end) { - db.put('a', 'not from snapshot', function (err) { - t.ifError(err, 'no put error') - - it.next(function (err, key, value) { - t.ifError(err, 'no next error') - - t.ok(key, 'got a key') - t.is(key.toString(), 'z', 'correct key') - t.is(value.toString(), 'from snapshot', 'correct value') - - end() - }) - }) - })) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.snapshot(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/iterator-test.js b/node_modules/abstract-leveldown/test/iterator-test.js deleted file mode 100644 index 8b82ff4..0000000 --- a/node_modules/abstract-leveldown/test/iterator-test.js +++ /dev/null @@ -1,172 +0,0 @@ -var db - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test iterator has db reference', function (t) { - var iterator = db.iterator() - t.ok(iterator.db === db) - iterator.end(t.end.bind(t)) - }) - - test('test argument-less iterator#next() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.next.bind(iterator), - /Error: next\(\) requires a callback argument/, - 'no-arg iterator#next() throws' - ) - iterator.end(t.end.bind(t)) - }) - - test('test argument-less iterator#end() after next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function () { - t.throws( - iterator.end.bind(iterator), - /Error: end\(\) requires a callback argument/, - 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) - }) - - test('test argument-less iterator#end() throws', function (t) { - var iterator = db.iterator() - t.throws( - iterator.end.bind(iterator), - /Error: end\(\) requires a callback argument/, - 'no-arg iterator#end() throws' - ) - iterator.end(t.end.bind(t)) - }) - - test('test iterator#next returns this', function (t) { - var iterator = db.iterator() - var self = iterator.next(function () {}) - t.ok(iterator === self) - iterator.end(t.end.bind(t)) - }) -} - -exports.sequence = function (test, testCommon) { - test('test twice iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.error(err) - - var async = false - - iterator.end(function (err2) { - t.ok(err2, 'returned error') - t.is(err2.name, 'Error', 'correct error') - t.is(err2.message, 'end() already called on iterator') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - }) - - test('test iterator#next after iterator#end() callback with error', function (t) { - var iterator = db.iterator() - iterator.end(function (err) { - t.error(err) - - var async = false - - iterator.next(function (err2) { - t.ok(err2, 'returned error') - t.is(err2.name, 'Error', 'correct error') - t.is(err2.message, 'cannot call next() after end()', 'correct message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - }) - - test('test twice iterator#next() throws', function (t) { - var iterator = db.iterator() - iterator.next(function (err) { - t.error(err) - iterator.end(function (err) { - t.error(err) - t.end() - }) - }) - - var async = false - - iterator.next(function (err) { - t.ok(err, 'returned error') - t.is(err.name, 'Error', 'correct error') - t.is(err.message, 'cannot call next() before previous next() has completed') - t.ok(async, 'callback is asynchronous') - }) - - async = true - }) -} - -exports.iterator = function (test, testCommon) { - test('test simple iterator()', function (t) { - var data = [ - { type: 'put', key: 'foobatch1', value: 'bar1' }, - { type: 'put', key: 'foobatch2', value: 'bar2' }, - { type: 'put', key: 'foobatch3', value: 'bar3' } - ] - var idx = 0 - - db.batch(data, function (err) { - t.error(err) - var iterator = db.iterator() - var fn = function (err, key, value) { - t.error(err) - if (key && value) { - t.ok(Buffer.isBuffer(key), 'key argument is a Buffer') - t.ok(Buffer.isBuffer(value), 'value argument is a Buffer') - t.is(key.toString(), data[idx].key, 'correct key') - t.is(value.toString(), data[idx].value, 'correct value') - process.nextTick(next) - idx++ - } else { // end - t.ok(typeof err === 'undefined', 'err argument is undefined') - t.ok(typeof key === 'undefined', 'key argument is undefined') - t.ok(typeof value === 'undefined', 'value argument is undefined') - t.is(idx, data.length, 'correct number of entries') - iterator.end(function () { - t.end() - }) - } - } - var next = function () { - iterator.next(fn) - } - - next() - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.sequence(test, testCommon) - exports.iterator(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/leveldown-test.js b/node_modules/abstract-leveldown/test/leveldown-test.js deleted file mode 100644 index a640768..0000000 --- a/node_modules/abstract-leveldown/test/leveldown-test.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function (test, testCommon) { - test('setUp common', testCommon.setUp) - - test('test database open method exists', function (t) { - var db = testCommon.factory() - t.ok(db, 'database object returned') - t.ok(typeof db.open === 'function', 'open() function exists') - t.end() - }) - - test('tearDown', testCommon.tearDown) -} diff --git a/node_modules/abstract-leveldown/test/manifest-test.js b/node_modules/abstract-leveldown/test/manifest-test.js deleted file mode 100644 index 104c843..0000000 --- a/node_modules/abstract-leveldown/test/manifest-test.js +++ /dev/null @@ -1,21 +0,0 @@ -var suite = require('level-supports/test') - -module.exports = function (test, testCommon) { - test('setUp common', testCommon.setUp) - - suite(test, testCommon) - - test('manifest has status', function (t) { - var db = testCommon.factory() - t.is(db.supports.status, true) - - // The semantics of not opening or closing a new db are unclear - // atm, so let's open it before closing, like every other test. - db.open(function (err) { - t.ifError(err, 'no open error') - db.close(t.end.bind(t)) - }) - }) - - test('tearDown', testCommon.tearDown) -} diff --git a/node_modules/abstract-leveldown/test/open-create-if-missing-test.js b/node_modules/abstract-leveldown/test/open-create-if-missing-test.js deleted file mode 100644 index 388281a..0000000 --- a/node_modules/abstract-leveldown/test/open-create-if-missing-test.js +++ /dev/null @@ -1,29 +0,0 @@ -exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -exports.createIfMissing = function (test, testCommon) { - test('test database open createIfMissing:false', function (t) { - var db = testCommon.factory() - var async = false - - db.open({ createIfMissing: false }, function (err) { - t.ok(err, 'error') - t.ok(/does not exist/.test(err.message), 'error is about dir not existing') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.createIfMissing(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/open-error-if-exists-test.js b/node_modules/abstract-leveldown/test/open-error-if-exists-test.js deleted file mode 100644 index 96d3cd1..0000000 --- a/node_modules/abstract-leveldown/test/open-error-if-exists-test.js +++ /dev/null @@ -1,37 +0,0 @@ -exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -exports.errorIfExists = function (test, testCommon) { - test('test database open errorIfExists:true', function (t) { - var db = testCommon.factory() - - db.open({}, function (err) { - t.error(err) - db.close(function (err) { - t.error(err) - - var async = false - - db.open({ createIfMissing: false, errorIfExists: true }, function (err) { - t.ok(err, 'error') - t.ok(/exists/.test(err.message), 'error is about already existing') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.errorIfExists(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/open-test.js b/node_modules/abstract-leveldown/test/open-test.js deleted file mode 100644 index 9d7ef2b..0000000 --- a/node_modules/abstract-leveldown/test/open-test.js +++ /dev/null @@ -1,79 +0,0 @@ -exports.setUp = function (test, testCommon) { - test('setUp', testCommon.setUp) -} - -exports.args = function (test, testCommon) { - test('test database open no-arg throws', function (t) { - var db = testCommon.factory() - t.throws( - db.open.bind(db), - /Error: open\(\) requires a callback argument/, - 'no-arg open() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, open() throws', function (t) { - var db = testCommon.factory() - t.throws( - db.open.bind(db, {}), - /Error: open\(\) requires a callback argument/, - 'callback-less, 1-arg open() throws' - ) - t.end() - }) -} - -exports.open = function (test, testCommon) { - test('test database open, no options', function (t) { - var db = testCommon.factory() - - // default createIfMissing=true, errorIfExists=false - db.open(function (err) { - t.error(err) - db.close(function () { - t.end() - }) - }) - }) - - test('test database open, options and callback', function (t) { - var db = testCommon.factory() - - // default createIfMissing=true, errorIfExists=false - db.open({}, function (err) { - t.error(err) - db.close(function () { - t.end() - }) - }) - }) - - test('test database open, close and open', function (t) { - var db = testCommon.factory() - - db.open(function (err) { - t.error(err) - db.close(function (err) { - t.error(err) - db.open(function (err) { - t.error(err) - db.close(function () { - t.end() - }) - }) - }) - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', testCommon.tearDown) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.open(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/put-get-del-test.js b/node_modules/abstract-leveldown/test/put-get-del-test.js deleted file mode 100644 index b8fc3ee..0000000 --- a/node_modules/abstract-leveldown/test/put-get-del-test.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict' - -var db -var verifyNotFoundError = require('./util').verifyNotFoundError -var testBuffer = Buffer.from('testbuffer') - -function makeGetDelErrorTests (test, type, key, expectedError) { - test('test get() with ' + type + ' causes error', function (t) { - var async = false - - db.get(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - - test('test del() with ' + type + ' causes error', function (t) { - var async = false - - db.del(key, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) -} - -function makePutErrorTest (test, type, key, value, expectedError) { - test('test put() with ' + type + ' causes error', function (t) { - var async = false - - db.put(key, value, function (err) { - t.ok(err, 'has error') - t.ok(err instanceof Error) - t.ok(err.message.match(expectedError), 'correct error message') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) -} - -function makePutGetDelSuccessfulTest (test, type, key, value, expectedResult) { - var hasExpectedResult = arguments.length === 5 - test('test put()/get()/del() with ' + type, function (t) { - db.put(key, value, function (err) { - t.error(err) - db.get(key, function (err, _value) { - t.error(err, 'no error, has key/value for `' + type + '`') - t.ok(Buffer.isBuffer(_value), 'is a Buffer') - var result = _value - if (hasExpectedResult) { - t.equal(result.toString(), expectedResult) - } else { - if (result != null) { result = _value.toString() } - if (value != null) { value = value.toString() } - t.equals(result, value) - } - db.del(key, function (err) { - t.error(err, 'no error, deleted key/value for `' + type + '`') - - var async = false - - db.get(key, function (err, value) { - t.ok(err, 'entry properly deleted') - t.ok(verifyNotFoundError(err), 'should have correct error message') - t.equal(typeof value, 'undefined', 'value is undefined') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true - }) - }) - }) - }) -} - -function makeErrorKeyTest (test, type, key, expectedError) { - makeGetDelErrorTests(test, type, key, expectedError) - makePutErrorTest(test, type, key, 'foo', expectedError) -} - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.errorKeys = function (test, testCommon) { - makeErrorKeyTest(test, 'null key', null, /key cannot be `null` or `undefined`/) - makeErrorKeyTest(test, 'undefined key', undefined, /key cannot be `null` or `undefined`/) - makeErrorKeyTest(test, 'empty String key', '', /key cannot be an empty String/) - makeErrorKeyTest(test, 'empty Buffer key', Buffer.alloc(0), /key cannot be an empty \w*Buffer/) - makeErrorKeyTest(test, 'empty Array key', [], /key cannot be an empty Array/) -} - -exports.errorValues = function (test, testCommon) { - makePutErrorTest(test, 'null value', 'key', null, /value cannot be `null` or `undefined`/) - makePutErrorTest(test, 'undefined value', 'key', undefined, /value cannot be `null` or `undefined`/) -} - -exports.nonErrorKeys = function (test, testCommon) { - // valid falsey keys - makePutGetDelSuccessfulTest(test, '`0` key', 0, 'foo 0') - - // standard String key - makePutGetDelSuccessfulTest( - test - , 'long String key' - , 'some long string that I\'m using as a key for this unit test, cross your fingers human, we\'re going in!' - , 'foo' - ) - - if (testCommon.bufferKeys) { - makePutGetDelSuccessfulTest(test, 'Buffer key', testBuffer, 'foo') - } - - // non-empty Array as a value - makePutGetDelSuccessfulTest(test, 'Array value', 'foo', [1, 2, 3, 4]) -} - -exports.nonErrorValues = function (test, testCommon) { - // valid falsey values - makePutGetDelSuccessfulTest(test, '`false` value', 'foo false', false) - makePutGetDelSuccessfulTest(test, '`0` value', 'foo 0', 0) - makePutGetDelSuccessfulTest(test, '`NaN` value', 'foo NaN', NaN) - - // all of the following result in an empty-string value: - makePutGetDelSuccessfulTest(test, 'empty String value', 'foo', '', '') - makePutGetDelSuccessfulTest(test, 'empty Buffer value', 'foo', Buffer.alloc(0), '') - - // note that an implementation may return the value as an array - makePutGetDelSuccessfulTest(test, 'empty Array value', 'foo', [], '') - - // standard String value - makePutGetDelSuccessfulTest( - test - , 'long String value' - , 'foo' - , 'some long string that I\'m using as a key for this unit test, cross your fingers human, we\'re going in!' - ) - - // standard Buffer value - makePutGetDelSuccessfulTest(test, 'Buffer value', 'foo', testBuffer) - - // non-empty Array as a key - makePutGetDelSuccessfulTest(test, 'Array key', [1, 2, 3, 4], 'foo') -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.errorKeys(test, testCommon) - exports.errorValues(test, testCommon) - exports.nonErrorKeys(test, testCommon) - exports.nonErrorValues(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/put-test.js b/node_modules/abstract-leveldown/test/put-test.js deleted file mode 100644 index bc77206..0000000 --- a/node_modules/abstract-leveldown/test/put-test.js +++ /dev/null @@ -1,108 +0,0 @@ -var db -var isTypedArray = require('./util').isTypedArray - -exports.setUp = function (test, testCommon) { - test('setUp common', testCommon.setUp) - test('setUp db', function (t) { - db = testCommon.factory() - db.open(t.end.bind(t)) - }) -} - -exports.args = function (test, testCommon) { - test('test argument-less put() throws', function (t) { - t.throws( - db.put.bind(db), - /Error: put\(\) requires a callback argument/, - 'no-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 1-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo'), - /Error: put\(\) requires a callback argument/, - 'callback-less, 1-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 2-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar'), - /Error: put\(\) requires a callback argument/, - 'callback-less, 2-arg put() throws' - ) - t.end() - }) - - test('test callback-less, 3-arg, put() throws', function (t) { - t.throws( - db.put.bind(db, 'foo', 'bar', {}), - /Error: put\(\) requires a callback argument/, - 'callback-less, 3-arg put() throws' - ) - t.end() - }) - - test('test _serialize object', function (t) { - t.plan(3) - var db = testCommon.factory() - db._put = function (key, value, opts, callback) { - t.ok(key) - t.ok(value) - process.nextTick(callback) - } - db.put({}, {}, function (err, val) { - t.error(err) - }) - }) - - test('test custom _serialize*', function (t) { - t.plan(4) - var db = testCommon.factory() - db._serializeKey = db._serializeValue = function (data) { return data } - db._put = function (key, value, options, callback) { - t.deepEqual(key, { foo: 'bar' }) - t.deepEqual(value, { beep: 'boop' }) - process.nextTick(callback) - } - db.open(function () { - db.put({ foo: 'bar' }, { beep: 'boop' }, function (err) { - t.error(err) - db.close(t.error.bind(t)) - }) - }) - }) -} - -exports.put = function (test, testCommon) { - test('test simple put()', function (t) { - db.put('foo', 'bar', function (err) { - t.error(err) - db.get('foo', function (err, value) { - t.error(err) - var result = value.toString() - if (isTypedArray(value)) { - result = String.fromCharCode.apply(null, new Uint16Array(value)) - } - t.equal(result, 'bar') - t.end() - }) - }) - }) -} - -exports.tearDown = function (test, testCommon) { - test('tearDown', function (t) { - db.close(testCommon.tearDown.bind(null, t)) - }) -} - -exports.all = function (test, testCommon) { - exports.setUp(test, testCommon) - exports.args(test, testCommon) - exports.put(test, testCommon) - exports.tearDown(test, testCommon) -} diff --git a/node_modules/abstract-leveldown/test/self.js b/node_modules/abstract-leveldown/test/self.js deleted file mode 100644 index 8dfc625..0000000 --- a/node_modules/abstract-leveldown/test/self.js +++ /dev/null @@ -1,1017 +0,0 @@ -'use strict' - -var test = require('tape') -var sinon = require('sinon') -var inherits = require('util').inherits -var AbstractLevelDOWN = require('../').AbstractLevelDOWN -var AbstractIterator = require('../').AbstractIterator -var AbstractChainedBatch = require('../').AbstractChainedBatch - -var testCommon = require('./common')({ - test: test, - clear: true, - factory: function () { - return new AbstractLevelDOWN() - } -}) - -var rangeOptions = ['gt', 'gte', 'lt', 'lte'] -var legacyRangeOptions = ['start', 'end'] - -// Test the suite itself as well as the default implementation, -// excluding noop operations that can't pass the test suite. - -require('./leveldown-test')(test, testCommon) -require('./manifest-test')(test, testCommon) -require('./open-test').all(test, testCommon) - -require('./open-create-if-missing-test').setUp(test, testCommon) -require('./open-create-if-missing-test').tearDown(test, testCommon) - -require('./open-error-if-exists-test').setUp(test, testCommon) -require('./open-error-if-exists-test').tearDown(test, testCommon) - -require('./del-test').setUp(test, testCommon) -require('./del-test').args(test, testCommon) - -require('./get-test').setUp(test, testCommon) -require('./get-test').args(test, testCommon) - -require('./put-test').setUp(test, testCommon) -require('./put-test').args(test, testCommon) - -require('./put-get-del-test').setUp(test, testCommon) -require('./put-get-del-test').errorKeys(test, testCommon) -require('./put-get-del-test').tearDown(test, testCommon) - -require('./batch-test').setUp(test, testCommon) -require('./batch-test').args(test, testCommon) - -require('./chained-batch-test').setUp(test, testCommon) -require('./chained-batch-test').args(test, testCommon) -require('./chained-batch-test').tearDown(test, testCommon) - -require('./close-test').all(test, testCommon) - -require('./iterator-test').setUp(test, testCommon) -require('./iterator-test').args(test, testCommon) -require('./iterator-test').sequence(test, testCommon) -require('./iterator-test').tearDown(test, testCommon) - -require('./iterator-range-test').setUp(test, testCommon) -require('./iterator-range-test').tearDown(test, testCommon) - -require('./iterator-snapshot-test').setUp(test, testCommon) -require('./iterator-snapshot-test').tearDown(test, testCommon) - -require('./iterator-no-snapshot-test').setUp(test, testCommon) -require('./iterator-no-snapshot-test').tearDown(test, testCommon) - -require('./iterator-seek-test').setUp(test, testCommon) -require('./iterator-seek-test').sequence(test, testCommon) -require('./iterator-seek-test').tearDown(test, testCommon) - -require('./clear-test').setUp(test, testCommon) -require('./clear-test').args(test, testCommon) -require('./clear-test').tearDown(test, testCommon) - -require('./clear-range-test').setUp(test, testCommon) -require('./clear-range-test').tearDown(test, testCommon) - -function implement (ctor, methods) { - function Test () { - ctor.apply(this, arguments) - } - - inherits(Test, ctor) - - for (var k in methods) { - Test.prototype[k] = methods[k] - } - - return Test -} - -/** - * Extensibility - */ - -test('test core extensibility', function (t) { - var Test = implement(AbstractLevelDOWN) - var test = new Test() - t.equal(test.status, 'new', 'status is new') - t.end() -}) - -test('test key/value serialization', function (t) { - var Test = implement(AbstractLevelDOWN) - var test = new Test() - - ;['', {}, null, undefined, Buffer.alloc(0)].forEach(function (v) { - t.ok(test._serializeKey(v) === v, '_serializeKey is an identity function') - t.ok(test._serializeValue(v) === v, '_serializeValue is an identity function') - }) - - t.end() -}) - -test('test open() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { createIfMissing: true, errorIfExists: false } - var Test = implement(AbstractLevelDOWN, { _open: spy }) - var test = new Test('foobar') - - test.open(expectedCb) - - t.equal(spy.callCount, 1, 'got _open() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(0).args[0], expectedOptions, 'got default options argument') - - test.open({ options: 1 }, expectedCb) - - expectedOptions.options = 1 - - t.equal(spy.callCount, 2, 'got _open() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _open() was correct') - t.equal(spy.getCall(1).args.length, 2, 'got two arguments') - t.deepEqual(spy.getCall(1).args[0], expectedOptions, 'got expected options argument') - t.end() -}) - -test('test close() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var Test = implement(AbstractLevelDOWN, { _close: spy }) - var test = new Test('foobar') - - test.close(expectedCb) - - t.equal(spy.callCount, 1, 'got _close() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _close() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.end() -}) - -test('test get() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { asBuffer: true } - var expectedKey = 'a key' - var Test = implement(AbstractLevelDOWN, { _get: spy }) - var test = new Test('foobar') - - test.get(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _get() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], expectedOptions, 'got default options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.get(expectedKey, { options: 1 }, expectedCb) - - expectedOptions.options = 1 - - t.equal(spy.callCount, 2, 'got _get() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _get() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -test('test del() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { options: 1 } - var expectedKey = 'a key' - var Test = implement(AbstractLevelDOWN, { _del: spy }) - var test = new Test('foobar') - - test.del(expectedKey, expectedCb) - - t.equal(spy.callCount, 1, 'got _del() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected cb argument') - - test.del(expectedKey, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _del() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected cb argument') - t.end() -}) - -test('test put() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { options: 1 } - var expectedKey = 'a key' - var expectedValue = 'a value' - var Test = implement(AbstractLevelDOWN, { _put: spy }) - var test = new Test('foobar') - - test.put(expectedKey, expectedValue, expectedCb) - - t.equal(spy.callCount, 1, 'got _put() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 4, 'got four arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(0).args[2], {}, 'got blank options argument') - t.equal(spy.getCall(0).args[3], expectedCb, 'got expected cb argument') - - test.put(expectedKey, expectedValue, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _put() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(1).args.length, 4, 'got four arguments') - t.equal(spy.getCall(1).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(1).args[1], expectedValue, 'got expected value argument') - t.deepEqual(spy.getCall(1).args[2], expectedOptions, 'got blank options argument') - t.equal(spy.getCall(1).args[3], expectedCb, 'got expected cb argument') - t.end() -}) - -test('test batch([]) (array-form) extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { options: 1 } - var expectedArray = [ - { type: 'put', key: '1', value: '1' }, - { type: 'del', key: '2' } - ] - var Test = implement(AbstractLevelDOWN, { _batch: spy }) - var test = new Test('foobar') - - test.batch(expectedArray, expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.deepEqual(spy.getCall(0).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch(expectedArray, expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.deepEqual(spy.getCall(1).args[0], expectedArray, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - test.batch(expectedArray, null, expectedCb) - - t.equal(spy.callCount, 3, 'got _batch() call') - t.equal(spy.getCall(2).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(2).args.length, 3, 'got three arguments') - t.deepEqual(spy.getCall(2).args[0], expectedArray, 'got expected array argument') - t.ok(spy.getCall(2).args[1], 'options should not be null') - t.equal(spy.getCall(2).args[2], expectedCb, 'got expected callback argument') - t.end() -}) - -test('test batch([]) (array-form) with empty array is asynchronous', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { _batch: spy }) - var test = new Test() - var async = false - - test.batch([], function (err) { - t.ifError(err, 'no error') - t.ok(async, 'callback is asynchronous') - - // Assert that asynchronicity is provided by batch() rather than _batch() - t.is(spy.callCount, 0, '_batch() call was bypassed') - t.end() - }) - - async = true -}) - -test('test chained batch() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var expectedOptions = { options: 1 } - var Test = implement(AbstractLevelDOWN, { _batch: spy }) - var test = new Test('foobar') - - test.batch().put('foo', 'bar').del('bang').write(expectedCb) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(0).args.length, 3, 'got three arguments') - t.equal(spy.getCall(0).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(0).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(0).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(0).args[1], {}, 'got expected options argument') - t.equal(spy.getCall(0).args[2], expectedCb, 'got expected callback argument') - - test.batch().put('foo', 'bar').del('bang').write(expectedOptions, expectedCb) - - t.equal(spy.callCount, 2, 'got _batch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _batch() was correct') - t.equal(spy.getCall(1).args.length, 3, 'got three arguments') - t.equal(spy.getCall(1).args[0].length, 2, 'got expected array argument') - t.deepEqual(spy.getCall(1).args[0][0], { type: 'put', key: 'foo', value: 'bar' }, 'got expected array argument[0]') - t.deepEqual(spy.getCall(1).args[0][1], { type: 'del', key: 'bang' }, 'got expected array argument[1]') - t.deepEqual(spy.getCall(1).args[1], expectedOptions, 'got expected options argument') - t.equal(spy.getCall(1).args[2], expectedCb, 'got expected callback argument') - - t.end() -}) - -test('test chained batch() with no operations is asynchronous', function (t) { - var Test = implement(AbstractLevelDOWN, {}) - var test = new Test() - var async = false - - test.batch().write(function (err) { - t.ifError(err, 'no error') - t.ok(async, 'callback is asynchronous') - t.end() - }) - - async = true -}) - -test('test chained batch() (custom _chainedBatch) extensibility', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { _chainedBatch: spy }) - var test = new Test('foobar') - - test.batch() - - t.equal(spy.callCount, 1, 'got _chainedBatch() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _chainedBatch() was correct') - - test.batch() - - t.equal(spy.callCount, 2, 'got _chainedBatch() call') - t.equal(spy.getCall(1).thisValue, test, '`this` on _chainedBatch() was correct') - - t.end() -}) - -test('test AbstractChainedBatch extensibility', function (t) { - var Test = implement(AbstractChainedBatch) - var db = {} - var test = new Test(db) - t.ok(test.db === db, 'instance has db reference') - t.end() -}) - -test('test AbstractChainedBatch expects a db', function (t) { - t.plan(1) - - var Test = implement(AbstractChainedBatch) - - try { - Test() - } catch (err) { - t.is(err.message, 'First argument must be an abstract-leveldown compliant store') - } -}) - -test('test AbstractChainedBatch#write() extensibility', function (t) { - var spy = sinon.spy() - var spycb = sinon.spy() - var Test = implement(AbstractChainedBatch, { _write: spy }) - var test = new Test({ test: true }) - - test.write(spycb) - - t.equal(spy.callCount, 1, 'got _write() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _write() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.same(spy.getCall(0).args[0], {}, 'got options') - // awkward here cause of nextTick & an internal wrapped cb - t.equal(typeof spy.getCall(0).args[1], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[1]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -test('test AbstractChainedBatch#write() extensibility with null options', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractChainedBatch, { _write: spy }) - var test = new Test({ test: true }) - - test.write(null, function () {}) - - t.equal(spy.callCount, 1, 'got _write() call') - t.same(spy.getCall(0).args[0], {}, 'got options') - t.end() -}) - -test('test AbstractChainedBatch#write() extensibility with options', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractChainedBatch, { _write: spy }) - var test = new Test({ test: true }) - - test.write({ test: true }, function () {}) - - t.equal(spy.callCount, 1, 'got _write() call') - t.same(spy.getCall(0).args[0], { test: true }, 'got options') - t.end() -}) - -test('test AbstractChainedBatch#put() extensibility', function (t) { - var spy = sinon.spy() - var expectedKey = 'key' - var expectedValue = 'value' - var Test = implement(AbstractChainedBatch, { _put: spy }) - var test = new Test(testCommon.factory()) - var returnValue = test.put(expectedKey, expectedValue) - - t.equal(spy.callCount, 1, 'got _put call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _put() was correct') - t.equal(spy.getCall(0).args.length, 2, 'got two arguments') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(spy.getCall(0).args[1], expectedValue, 'got expected value argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -test('test AbstractChainedBatch#del() extensibility', function (t) { - var spy = sinon.spy() - var expectedKey = 'key' - var Test = implement(AbstractChainedBatch, { _del: spy }) - var test = new Test(testCommon.factory()) - var returnValue = test.del(expectedKey) - - t.equal(spy.callCount, 1, 'got _del call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _del() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one argument') - t.equal(spy.getCall(0).args[0], expectedKey, 'got expected key argument') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -test('test AbstractChainedBatch#clear() extensibility', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractChainedBatch, { _clear: spy }) - var test = new Test(testCommon.factory()) - var returnValue = test.clear() - - t.equal(spy.callCount, 1, 'got _clear call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _clear() was correct') - t.equal(spy.getCall(0).args.length, 0, 'got zero arguments') - t.equal(returnValue, test, 'get expected return value') - t.end() -}) - -test('test iterator() extensibility', function (t) { - var spy = sinon.spy() - var expectedOptions = { - options: 1, - reverse: false, - keys: true, - values: true, - limit: -1, - keyAsBuffer: true, - valueAsBuffer: true - } - var Test = implement(AbstractLevelDOWN, { _iterator: spy }) - var test = new Test('foobar') - - test.iterator({ options: 1 }) - - t.equal(spy.callCount, 1, 'got _iterator() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _iterator() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.deepEqual(spy.getCall(0).args[0], expectedOptions, 'got expected options argument') - t.end() -}) - -test('test AbstractIterator extensibility', function (t) { - var Test = implement(AbstractIterator) - var db = {} - var test = new Test(db) - t.ok(test.db === db, 'instance has db reference') - t.end() -}) - -test('test AbstractIterator#next() extensibility', function (t) { - var spy = sinon.spy() - var spycb = sinon.spy() - var Test = implement(AbstractIterator, { _next: spy }) - var test = new Test({}) - - test.next(spycb) - - t.equal(spy.callCount, 1, 'got _next() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _next() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - // awkward here cause of nextTick & an internal wrapped cb - t.equal(typeof spy.getCall(0).args[0], 'function', 'got a callback function') - t.equal(spycb.callCount, 0, 'spycb not called') - spy.getCall(0).args[0]() - t.equal(spycb.callCount, 1, 'spycb called, i.e. was our cb argument') - t.end() -}) - -test('test AbstractIterator#end() extensibility', function (t) { - var spy = sinon.spy() - var expectedCb = function () {} - var Test = implement(AbstractIterator, { _end: spy }) - var test = new Test({}) - - test.end(expectedCb) - - t.equal(spy.callCount, 1, 'got _end() call') - t.equal(spy.getCall(0).thisValue, test, '`this` on _end() was correct') - t.equal(spy.getCall(0).args.length, 1, 'got one arguments') - t.equal(spy.getCall(0).args[0], expectedCb, 'got expected cb argument') - t.end() -}) - -test('test clear() extensibility', function (t) { - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { _clear: spy }) - var db = new Test() - var callback = function () {} - - call([callback], { reverse: false, limit: -1 }) - call([null, callback], { reverse: false, limit: -1 }) - call([undefined, callback], { reverse: false, limit: -1 }) - call([{ custom: 1 }, callback], { custom: 1, reverse: false, limit: -1 }) - call([{ reverse: true, limit: 0 }, callback], { reverse: true, limit: 0 }) - call([{ reverse: 1 }, callback], { reverse: true, limit: -1 }) - call([{ reverse: null }, callback], { reverse: false, limit: -1 }) - - function call (args, expectedOptions) { - db.clear.apply(db, args) - - t.is(spy.callCount, 1, 'got _clear() call') - t.is(spy.getCall(0).thisValue, db, '`this` on _clear() was correct') - t.is(spy.getCall(0).args.length, 2, 'got two arguments') - t.same(spy.getCall(0).args[0], expectedOptions, 'got expected options argument') - t.is(spy.getCall(0).args[1], callback, 'got expected callback argument') - - spy.resetHistory() - } - - t.end() -}) - -test('test serialization extensibility (put)', function (t) { - t.plan(5) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _put: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - - _serializeValue: function (value) { - t.equal(value, 'nope') - return 'bar' - } - }) - - var test = new Test('foobar') - test.put('no', 'nope', function () {}) - - t.equal(spy.callCount, 1, 'got _put() call') - t.equal(spy.getCall(0).args[0], 'foo', 'got expected key argument') - t.equal(spy.getCall(0).args[1], 'bar', 'got expected value argument') -}) - -test('test serialization extensibility (del)', function (t) { - t.plan(3) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _del: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.fail('should not be called') - } - }) - - var test = new Test('foobar') - test.del('no', function () {}) - - t.equal(spy.callCount, 1, 'got _del() call') - t.equal(spy.getCall(0).args[0], 'foo', 'got expected key argument') - - t.end() -}) - -test('test serialization extensibility (batch array put)', function (t) { - t.plan(5) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _batch: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.equal(value, 'nope') - return 'bar' - } - }) - - var test = new Test('foobar') - test.batch([{ type: 'put', key: 'no', value: 'nope' }], function () {}) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).args[0][0].key, 'foo', 'got expected key') - t.equal(spy.getCall(0).args[0][0].value, 'bar', 'got expected value') -}) - -test('test serialization extensibility (batch chain put)', function (t) { - t.plan(5) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _batch: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.equal(value, 'nope') - return 'bar' - } - }) - - var test = new Test('foobar') - test.batch().put('no', 'nope').write(function () {}) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).args[0][0].key, 'foo', 'got expected key') - t.equal(spy.getCall(0).args[0][0].value, 'bar', 'got expected value') -}) - -test('test serialization extensibility (batch array del)', function (t) { - t.plan(3) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _batch: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.fail('should not be called') - } - }) - - var test = new Test('foobar') - test.batch([{ type: 'del', key: 'no' }], function () {}) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).args[0][0].key, 'foo', 'got expected key') -}) - -test('test serialization extensibility (batch chain del)', function (t) { - t.plan(3) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _batch: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.fail('should not be called') - } - }) - - var test = new Test('foobar') - test.batch().del('no').write(function () {}) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).args[0][0].key, 'foo', 'got expected key') -}) - -test('test serialization extensibility (batch array is not mutated)', function (t) { - t.plan(7) - - var spy = sinon.spy() - var Test = implement(AbstractLevelDOWN, { - _batch: spy, - _serializeKey: function (key) { - t.equal(key, 'no') - return 'foo' - }, - _serializeValue: function (value) { - t.equal(value, 'nope') - return 'bar' - } - }) - - var test = new Test('foobar') - var op = { type: 'put', key: 'no', value: 'nope' } - - test.batch([op], function () {}) - - t.equal(spy.callCount, 1, 'got _batch() call') - t.equal(spy.getCall(0).args[0][0].key, 'foo', 'got expected key') - t.equal(spy.getCall(0).args[0][0].value, 'bar', 'got expected value') - - t.equal(op.key, 'no', 'did not mutate input key') - t.equal(op.value, 'nope', 'did not mutate input value') -}) - -test('test serialization extensibility (iterator range options)', function (t) { - t.plan(2) - - function Test () { - AbstractLevelDOWN.call(this) - } - - inherits(Test, AbstractLevelDOWN) - - Test.prototype._serializeKey = function (key) { - t.is(key, 'input') - return 'output' - } - - Test.prototype._iterator = function (options) { - return new Iterator(this, options) - } - - function Iterator (db, options) { - AbstractIterator.call(this, db) - t.is(options.gt, 'output') - } - - inherits(Iterator, AbstractIterator) - - var test = new Test() - test.iterator({ gt: 'input' }) -}) - -test('test serialization extensibility (iterator seek)', function (t) { - t.plan(3) - - var spy = sinon.spy() - var TestIterator = implement(AbstractIterator, { _seek: spy }) - - var Test = implement(AbstractLevelDOWN, { - _iterator: function () { - return new TestIterator(this) - }, - _serializeKey: function (key) { - t.equal(key, 'target') - return 'serialized' - } - }) - - var test = new Test('foobar') - var it = test.iterator() - - it.seek('target') - - t.equal(spy.callCount, 1, 'got _seek() call') - t.equal(spy.getCall(0).args[0], 'serialized', 'got expected target argument') -}) - -test('test serialization extensibility (clear range options)', function (t) { - t.plan(rangeOptions.length * 2) - - rangeOptions.forEach(function (key) { - var Test = implement(AbstractLevelDOWN, { - _serializeKey: function (key) { - t.is(key, 'input') - return 'output' - }, - _clear: function (options, callback) { - t.is(options[key], 'output') - } - }) - - var db = new Test() - var options = {} - - options[key] = 'input' - db.clear(options, function () {}) - }) -}) - -test('clear() does not delete empty or nullish range options', function (t) { - var rangeValues = [Buffer.alloc(0), '', null, undefined] - - t.plan(rangeOptions.length * rangeValues.length) - - rangeValues.forEach(function (value) { - var Test = implement(AbstractLevelDOWN, { - _clear: function (options, callback) { - rangeOptions.forEach(function (key) { - t.ok(key in options, key + ' option should not be deleted') - }) - } - }) - - var db = new Test() - var options = {} - - rangeOptions.forEach(function (key) { - options[key] = value - }) - - db.clear(options, function () {}) - }) -}) - -test('.status', function (t) { - t.plan(5) - - t.test('empty prototype', function (t) { - var Test = implement(AbstractLevelDOWN) - var test = new Test('foobar') - - t.equal(test.status, 'new') - - test.open(function (err) { - t.error(err) - t.equal(test.status, 'open') - - test.close(function (err) { - t.error(err) - t.equal(test.status, 'closed') - t.end() - }) - }) - }) - - t.test('open error', function (t) { - var Test = implement(AbstractLevelDOWN, { - _open: function (options, cb) { - cb(new Error()) - } - }) - - var test = new Test('foobar') - - test.open(function (err) { - t.ok(err) - t.equal(test.status, 'new') - t.end() - }) - }) - - t.test('close error', function (t) { - var Test = implement(AbstractLevelDOWN, { - _close: function (cb) { - cb(new Error()) - } - }) - - var test = new Test('foobar') - test.open(function () { - test.close(function (err) { - t.ok(err) - t.equal(test.status, 'open') - t.end() - }) - }) - }) - - t.test('open', function (t) { - var Test = implement(AbstractLevelDOWN, { - _open: function (options, cb) { - process.nextTick(cb) - } - }) - - var test = new Test('foobar') - test.open(function (err) { - t.error(err) - t.equal(test.status, 'open') - t.end() - }) - t.equal(test.status, 'opening') - }) - - t.test('close', function (t) { - var Test = implement(AbstractLevelDOWN, { - _close: function (cb) { - process.nextTick(cb) - } - }) - - var test = new Test('foobar') - test.open(function (err) { - t.error(err) - test.close(function (err) { - t.error(err) - t.equal(test.status, 'closed') - t.end() - }) - t.equal(test.status, 'closing') - }) - }) -}) - -test('_setupIteratorOptions', function (t) { - var keys = legacyRangeOptions.concat(rangeOptions) - var db = new AbstractLevelDOWN() - - function setupOptions (constrFn) { - var options = {} - keys.forEach(function (key) { - options[key] = constrFn() - }) - return options - } - - function verifyOptions (t, options) { - keys.forEach(function (key) { - t.ok(key in options, key + ' option should not be deleted') - }) - t.end() - } - - t.plan(6) - - t.test('default options', function (t) { - t.same(db._setupIteratorOptions(), { - reverse: false, - keys: true, - values: true, - limit: -1, - keyAsBuffer: true, - valueAsBuffer: true - }, 'correct defaults') - t.end() - }) - - t.test('set options', function (t) { - t.same(db._setupIteratorOptions({ - reverse: false, - keys: false, - values: false, - limit: 20, - keyAsBuffer: false, - valueAsBuffer: false - }), { - reverse: false, - keys: false, - values: false, - limit: 20, - keyAsBuffer: false, - valueAsBuffer: false - }, 'options set correctly') - t.end() - }) - - t.test('does not delete empty buffers', function (t) { - var options = setupOptions(function () { return Buffer.from('') }) - keys.forEach(function (key) { - t.is(Buffer.isBuffer(options[key]), true, 'should be buffer') - t.is(options[key].length, 0, 'should be empty') - }) - verifyOptions(t, db._setupIteratorOptions(options)) - }) - - t.test('does not delete empty strings', function (t) { - var options = setupOptions(function () { return '' }) - keys.forEach(function (key) { - t.is(typeof options[key], 'string', 'should be string') - t.is(options[key].length, 0, 'should be empty') - }) - verifyOptions(t, db._setupIteratorOptions(options)) - }) - - t.test('does not delete null', function (t) { - var options = setupOptions(function () { return null }) - keys.forEach(function (key) { - t.is(options[key], null, 'should be null') - }) - verifyOptions(t, db._setupIteratorOptions(options)) - }) - - t.test('does not delete undefined', function (t) { - var options = setupOptions(function () { return undefined }) - keys.forEach(function (key) { - t.is(options[key], undefined, 'should be undefined') - }) - verifyOptions(t, db._setupIteratorOptions(options)) - }) -}) diff --git a/node_modules/abstract-leveldown/test/util.js b/node_modules/abstract-leveldown/test/util.js deleted file mode 100644 index db65626..0000000 --- a/node_modules/abstract-leveldown/test/util.js +++ /dev/null @@ -1,10 +0,0 @@ -var nfre = /NotFound/i - -exports.verifyNotFoundError = function verifyNotFoundError (err) { - return nfre.test(err.message) || nfre.test(err.name) -} - -exports.isTypedArray = function isTypedArray (value) { - return (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) || - (typeof Uint8Array !== 'undefined' && value instanceof Uint8Array) -} diff --git a/node_modules/async/CHANGELOG.md b/node_modules/async/CHANGELOG.md deleted file mode 100644 index ec6b871..0000000 --- a/node_modules/async/CHANGELOG.md +++ /dev/null @@ -1,278 +0,0 @@ -# v2.6.4 -- Fix potential prototype pollution exploit (#1828) - -# v2.6.3 -- Updated lodash to squelch a security warning (#1675) - -# v2.6.2 -- Updated lodash to squelch a security warning (#1620) - -# v2.6.1 -- Updated lodash to prevent `npm audit` warnings. (#1532, #1533) -- Made `async-es` more optimized for webpack users (#1517) -- Fixed a stack overflow with large collections and a synchronous iterator (#1514) -- Various small fixes/chores (#1505, #1511, #1527, #1530) - -# v2.6.0 -- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483) -- Improved `queue` performance. (#1448, #1454) -- Add missing sourcemap (#1452, #1453) -- Various doc updates (#1448, #1471, #1483) - -# v2.5.0 -- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430)) -- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436)) -- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429)) -- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424)) - -# v2.4.1 -- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419)) - -# v2.4.0 -- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687)) -- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395)) -- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391)) -- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403)) -- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408)) -- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367)) -- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412)) - -# v2.3.0 -- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390)) -- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392)) - -# v2.2.0 -- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364)) -- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381)) -- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385)) - -# v2.1.5 -- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358)) -- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349)) -- Avoid stack overflow case in queue -- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined. -- Cleanup implementations of `some`, `every` and `find` - -# v2.1.3 -- Make bundle size smaller -- Create optimized hotpath for `filter` in array case. - -# v2.1.2 -- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)). - -# v2.1.0 - -- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261)) -- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253)) -- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254)) -- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300)) -- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302)) - -# v2.0.1 - -- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)). - -# v2.0.0 - -Lots of changes here! - -First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well. - -The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before. - -We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size. - -Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy. - -Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that: - -1. Takes a variable number of arguments -2. The last argument is always a callback -3. The callback can accept any number of arguments -4. The first argument passed to the callback will be treated as an error result, if the argument is truthy -5. Any number of result arguments can be passed after the "error" argument -6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop. - -There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`. - -Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`. - -Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205). - -## New Features - -- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996)) -- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038)) -- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074)) -- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027)) -- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095)) -- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052)) -- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053)) -- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)). -- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100)) -- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637)) -- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058)) -- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161)) -- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)). -- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034)) -- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170)) -- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088)) - -## Breaking changes - -- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050)) -- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042)) -- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050)) -- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177)) -- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041)) -- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847)) -- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058)) -- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224)) -- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)). -- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078)) -- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237)) -- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176)) - -## Bug Fixes - -- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)). -- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)). -- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)). - -## Other - -- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases. -- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`). -- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238)) - -Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async. - ------------------------------------------- - -# v1.5.2 -- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998)) -- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994)) -- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002)) - -# v1.5.1 -- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946)) -- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963)) -- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966)) -- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993)) -- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980)) - -# v1.5.0 - -- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892)) -- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873)) -- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637)) -- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891)) -- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904)) -- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912)) - -# v1.4.2 - -- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879)) - -# v1.4.1 - -- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866)) -- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861)) -- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870)) - -# v1.4.0 - -- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840)) -- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836)) -- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829)) -- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers -- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823)) -- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824)) -- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0)) - - -# v1.3.0 - -New Features: -- Added `constant` -- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806)) -- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800)) -- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793)) -- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804)) -- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642)) -- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803)) -- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794)) - -Bug Fixes: -- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783)) - - -# v1.2.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.2.0 - -New Features: - -- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743)) -- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772)) - -Bug Fixes: - -- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777)) - - -# v1.1.1 - -Bug Fix: - -- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782)) - - -# v1.1.0 - -New Features: - -- `cargo` now supports all of the same methods and event callbacks as `queue`. -- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769)) -- Optimized `map`, `eachOf`, and `waterfall` families of functions -- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)). -- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618)) -- Reduced file size by 4kb, (minified version by 1kb) -- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768)) - -Bug Fixes: - -- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622)) -- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754)) -- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439)) -- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668)) -- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578)) -- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557)) -- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593)) -- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766)) - - -# v1.0.0 - -No known breaking changes, we are simply complying with semver from here on out. - -Changes: - -- Start using a changelog! -- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321)) -- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663)) -- Better support for require.js ([#527](https://github.com/caolan/async/issues/527)) -- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714)) -- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758)) -- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611)) -- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729)) -- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546)) -- Optimize internal `_each`, `_map` and `_keys` functions. diff --git a/node_modules/async/LICENSE b/node_modules/async/LICENSE deleted file mode 100644 index b18aed6..0000000 --- a/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2018 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/async/README.md b/node_modules/async/README.md deleted file mode 100644 index 49cf950..0000000 --- a/node_modules/async/README.md +++ /dev/null @@ -1,56 +0,0 @@ -![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg) - -[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) -[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async) -[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master) -[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![libhive - Open source examples](https://www.libhive.com/providers/npm/packages/async/examples/badge.svg)](https://www.libhive.com/providers/npm/packages/async) -[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async) - - -Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser. - -This version of the package is optimized for the Node.js environment. If you use Async with webpack, install [`async-es`](https://www.npmjs.com/package/async-es) instead. - -For Documentation, visit - -*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)* - - -```javascript -// for use with Node-style callbacks... -var async = require("async"); - -var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; -var configs = {}; - -async.forEachOf(obj, (value, key, callback) => { - fs.readFile(__dirname + value, "utf8", (err, data) => { - if (err) return callback(err); - try { - configs[key] = JSON.parse(data); - } catch (e) { - return callback(e); - } - callback(); - }); -}, err => { - if (err) console.error(err.message); - // configs is now a map of JSON data - doSomethingWith(configs); -}); -``` - -```javascript -var async = require("async"); - -// ...or ES2017 async functions -async.mapLimit(urls, 5, async function(url) { - const response = await fetch(url) - return response.body -}, (err, results) => { - if (err) throw err - // results is now an array of the response bodies - console.log(results) -}) -``` diff --git a/node_modules/async/all.js b/node_modules/async/all.js deleted file mode 100644 index d0565b0..0000000 --- a/node_modules/async/all.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/allLimit.js b/node_modules/async/allLimit.js deleted file mode 100644 index a1a759a..0000000 --- a/node_modules/async/allLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/allSeries.js b/node_modules/async/allSeries.js deleted file mode 100644 index 23bfebb..0000000 --- a/node_modules/async/allSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/any.js b/node_modules/async/any.js deleted file mode 100644 index a8e70f7..0000000 --- a/node_modules/async/any.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/anyLimit.js b/node_modules/async/anyLimit.js deleted file mode 100644 index 24ca3f4..0000000 --- a/node_modules/async/anyLimit.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/anySeries.js b/node_modules/async/anySeries.js deleted file mode 100644 index dc24ed2..0000000 --- a/node_modules/async/anySeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_someLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/apply.js b/node_modules/async/apply.js deleted file mode 100644 index f590fa5..0000000 --- a/node_modules/async/apply.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - return function () /*callArgs*/{ - var callArgs = (0, _slice2.default)(arguments); - return fn.apply(null, args.concat(callArgs)); - }; -}; - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; - -/** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/applyEach.js b/node_modules/async/applyEach.js deleted file mode 100644 index 06c0845..0000000 --- a/node_modules/async/applyEach.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument, `fns`, is provided, it will - * return a function which lets you pass in the arguments as if it were a single - * function call. The signature is `(..args, callback)`. If invoked with any - * arguments, `callback` is required. - * @example - * - * async.applyEach([enableSearch, updateSchema], 'bucket', callback); - * - * // partial application example: - * async.each( - * buckets, - * async.applyEach([enableSearch, updateSchema]), - * callback - * ); - */ -exports.default = (0, _applyEach2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/applyEachSeries.js b/node_modules/async/applyEachSeries.js deleted file mode 100644 index ad80280..0000000 --- a/node_modules/async/applyEachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _applyEach = require('./internal/applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _mapSeries = require('./mapSeries'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument is provided, it will return - * a function which lets you pass in the arguments as if it were a single - * function call. - */ -exports.default = (0, _applyEach2.default)(_mapSeries2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/asyncify.js b/node_modules/async/asyncify.js deleted file mode 100644 index 5e3fc91..0000000 --- a/node_modules/async/asyncify.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _isObject = require('lodash/isObject'); - -var _isObject2 = _interopRequireDefault(_isObject); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if ((0, _isObject2.default)(result) && typeof result.then === 'function') { - result.then(function (value) { - invokeCallback(callback, null, value); - }, function (err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - (0, _setImmediate2.default)(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/auto.js b/node_modules/async/auto.js deleted file mode 100644 index 26c1d56..0000000 --- a/node_modules/async/auto.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (tasks, concurrency, callback) { - if (typeof concurrency === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = (0, _once2.default)(callback || _noop2.default); - var keys = (0, _keys2.default)(tasks); - var numTasks = keys.length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - (0, _baseForOwn2.default)(tasks, function (task, key) { - if (!(0, _isArray2.default)(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - (0, _arrayEach2.default)(dependencies, function (dependencyName) { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + '` has a non-existent dependency `' + dependencyName + '` in ' + dependencies.join(', ')); - } - addListener(dependencyName, function () { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(function () { - runTask(key, task); - }); - } - - function processQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while (readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - (0, _arrayEach2.default)(taskListeners, function (fn) { - fn(); - }); - processQueue(); - } - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = (0, _onlyOnce2.default)(function (err, result) { - runningTasks--; - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } - if (err) { - var safeResults = {}; - (0, _baseForOwn2.default)(results, function (val, rkey) { - safeResults[rkey] = val; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = (0, _wrapAsync2.default)(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - (0, _arrayEach2.default)(getDependents(currentTask), function (dependent) { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error('async.auto cannot execute tasks due to a recursive dependency'); - } - } - - function getDependents(taskName) { - var result = []; - (0, _baseForOwn2.default)(tasks, function (task, key) { - if ((0, _isArray2.default)(task) && (0, _baseIndexOf2.default)(task, taskName, 0) >= 0) { - result.push(key); - } - }); - return result; - } -}; - -var _arrayEach = require('lodash/_arrayEach'); - -var _arrayEach2 = _interopRequireDefault(_arrayEach); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -var _baseIndexOf = require('lodash/_baseIndexOf'); - -var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _keys = require('lodash/keys'); - -var _keys2 = _interopRequireDefault(_keys); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns undefined - * @example - * - * async.auto({ - * // this function will just be passed a callback - * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), - * showData: ['readData', function(results, cb) { - * // results.readData is the file's contents - * // ... - * }] - * }, callback); - * - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * console.log('in write_file', JSON.stringify(results)); - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * console.log('in email_link', JSON.stringify(results)); - * // once the file is written let's email a link to it... - * // results.write_file contains the filename returned by write_file. - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * console.log('err = ', err); - * console.log('results = ', results); - * }); - */ \ No newline at end of file diff --git a/node_modules/async/autoInject.js b/node_modules/async/autoInject.js deleted file mode 100644 index bfbe7e8..0000000 --- a/node_modules/async/autoInject.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = autoInject; - -var _auto = require('./auto'); - -var _auto2 = _interopRequireDefault(_auto); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _trim = require('lodash/trim'); - -var _trim2 = _interopRequireDefault(_trim); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; - -function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function (arg) { - return (0, _trim2.default)(arg.replace(FN_ARG, '')); - }); - return func; -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - (0, _baseForOwn2.default)(tasks, function (taskFn, key) { - var params; - var fnIsAsync = (0, _wrapAsync.isAsync)(taskFn); - var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; - - if ((0, _isArray2.default)(taskFn)) { - params = taskFn.slice(0, -1); - taskFn = taskFn[taskFn.length - 1]; - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = (0, _arrayMap2.default)(params, function (name) { - return results[name]; - }); - newArgs.push(taskCb); - (0, _wrapAsync2.default)(taskFn).apply(null, newArgs); - } - }); - - (0, _auto2.default)(newTasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/bower.json b/node_modules/async/bower.json deleted file mode 100644 index 7dbeb14..0000000 --- a/node_modules/async/bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "async", - "main": "dist/async.js", - "ignore": [ - "bower_components", - "lib", - "mocha_test", - "node_modules", - "perf", - "support", - "**/.*", - "*.config.js", - "*.json", - "index.js", - "Makefile" - ] -} diff --git a/node_modules/async/cargo.js b/node_modules/async/cargo.js deleted file mode 100644 index c7e59c7..0000000 --- a/node_modules/async/cargo.js +++ /dev/null @@ -1,94 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cargo; - -var _queue = require('./internal/queue'); - -var _queue2 = _interopRequireDefault(_queue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A cargo of tasks for the worker function to complete. Cargo inherits all of - * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. - * @typedef {Object} CargoObject - * @memberOf module:ControlFlow - * @property {Function} length - A function returning the number of items - * waiting to be processed. Invoke like `cargo.length()`. - * @property {number} payload - An `integer` for determining how many tasks - * should be process per round. This property can be changed after a `cargo` is - * created to alter the payload on-the-fly. - * @property {Function} push - Adds `task` to the `queue`. The callback is - * called once the `worker` has finished processing the task. Instead of a - * single task, an array of `tasks` can be submitted. The respective callback is - * used for every task in the list. Invoke like `cargo.push(task, [callback])`. - * @property {Function} saturated - A callback that is called when the - * `queue.length()` hits the concurrency and further tasks will be queued. - * @property {Function} empty - A callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - A callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke like `cargo.idle()`. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke like `cargo.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke like `cargo.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. - */ - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i async.dir(hello, 'world'); - * {hello: 'world'} - */ -exports.default = (0, _consoleFunc2.default)('dir'); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/dist/async.js b/node_modules/async/dist/async.js deleted file mode 100644 index 61c7588..0000000 --- a/node_modules/async/dist/async.js +++ /dev/null @@ -1,5612 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.async = global.async || {}))); -}(this, (function (exports) { 'use strict'; - -function slice(arrayLike, start) { - start = start|0; - var newLen = Math.max(arrayLike.length - start, 0); - var newArr = Array(newLen); - for(var idx = 0; idx < newLen; idx++) { - newArr[idx] = arrayLike[start + idx]; - } - return newArr; -} - -/** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ -var apply = function(fn/*, ...args*/) { - var args = slice(arguments, 1); - return function(/*callArgs*/) { - var callArgs = slice(arguments); - return fn.apply(null, args.concat(callArgs)); - }; -}; - -var initialParams = function (fn) { - return function (/*...args, callback*/) { - var args = slice(arguments); - var callback = args.pop(); - fn.call(this, args, callback); - }; -}; - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; -} - -var _defer; - -if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -var setImmediate$1 = wrap(_defer); - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return initialParams(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (isObject(result) && typeof result.then === 'function') { - result.then(function(value) { - invokeCallback(callback, null, value); - }, function(err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - setImmediate$1(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} - -var supportsSymbol = typeof Symbol === 'function'; - -function isAsync(fn) { - return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function wrapAsync(asyncFn) { - return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; -} - -function applyEach$1(eachfn) { - return function(fns/*, ...args*/) { - var args = slice(arguments, 1); - var go = initialParams(function(args, callback) { - var that = this; - return eachfn(fns, function (fn, cb) { - wrapAsync(fn).apply(that, args.concat(cb)); - }, callback); - }); - if (args.length) { - return go.apply(this, args); - } - else { - return go; - } - }; -} - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Built-in value references. */ -var Symbol$1 = root.Symbol; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag$1), - tag = value[symToStringTag$1]; - - try { - value[symToStringTag$1] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag$1] = tag; - } else { - delete value[symToStringTag$1]; - } - } - return result; -} - -/** Used for built-in method references. */ -var objectProto$1 = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString$1 = objectProto$1.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString$1.call(value); -} - -/** `Object#toString` result references. */ -var nullTag = '[object Null]'; -var undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]'; -var funcTag = '[object Function]'; -var genTag = '[object GeneratorFunction]'; -var proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -var breakLoop = {}; - -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -function once(fn) { - return function () { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} - -var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; - -var getIterator = function (coll) { - return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); -}; - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -/** Used for built-in method references. */ -var objectProto$3 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$2 = objectProto$3.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto$3.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER$1 = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER$1 : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** `Object#toString` result references. */ -var argsTag$1 = '[object Arguments]'; -var arrayTag = '[object Array]'; -var boolTag = '[object Boolean]'; -var dateTag = '[object Date]'; -var errorTag = '[object Error]'; -var funcTag$1 = '[object Function]'; -var mapTag = '[object Map]'; -var numberTag = '[object Number]'; -var objectTag = '[object Object]'; -var regexpTag = '[object RegExp]'; -var setTag = '[object Set]'; -var stringTag = '[object String]'; -var weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]'; -var dataViewTag = '[object DataView]'; -var float32Tag = '[object Float32Array]'; -var float64Tag = '[object Float64Array]'; -var int8Tag = '[object Int8Array]'; -var int16Tag = '[object Int16Array]'; -var int32Tag = '[object Int32Array]'; -var uint8Tag = '[object Uint8Array]'; -var uint8ClampedTag = '[object Uint8ClampedArray]'; -var uint16Tag = '[object Uint16Array]'; -var uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -/** Detect free variable `exports`. */ -var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports$1 && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -/** Used for built-in method references. */ -var objectProto$2 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$1 = objectProto$2.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty$1.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -/** Used for built-in method references. */ -var objectProto$5 = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; - - return value === proto; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -/** Used for built-in method references. */ -var objectProto$4 = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty$3 = objectProto$4.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty$3.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? {value: coll[i], key: i} : null; - } -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) - return null; - i++; - return {value: item.value, key: i}; - } -} - -function createObjectIterator(obj) { - var okeys = keys(obj); - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? {value: obj[key], key: key} : null; - }; -} - -function iterator(coll) { - if (isArrayLike(coll)) { - return createArrayIterator(coll); - } - - var iterator = getIterator(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} - -function onlyOnce(fn) { - return function() { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} - -function _eachOfLimit(limit) { - return function (obj, iteratee, callback) { - callback = once(callback || noop); - if (limit <= 0 || !obj) { - return callback(null); - } - var nextElem = iterator(obj); - var done = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - running -= 1; - if (err) { - done = true; - callback(err); - } - else if (value === breakLoop || (done && running <= 0)) { - done = true; - return callback(null); - } - else if (!looping) { - replenish(); - } - } - - function replenish () { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -} - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); -} - -function doLimit(fn, limit) { - return function (iterable, iteratee, callback) { - return fn(iterable, limit, iteratee, callback); - }; -} - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback || noop); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if ((++completed === length) || value === breakLoop) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, onlyOnce(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = doLimit(eachOfLimit, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -var eachOf = function(coll, iteratee, callback) { - var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, wrapAsync(iteratee), callback); -}; - -function doParallel(fn) { - return function (obj, iteratee, callback) { - return fn(eachOf, obj, wrapAsync(iteratee), callback); - }; -} - -function _asyncMap(eachfn, arr, iteratee, callback) { - callback = callback || noop; - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = wrapAsync(iteratee); - - eachfn(arr, function (value, _, callback) { - var index = counter++; - _iteratee(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callback - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @example - * - * async.map(['file1','file2','file3'], fs.stat, function(err, results) { - * // results is now an array of stats for each file - * }); - */ -var map = doParallel(_asyncMap); - -/** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument, `fns`, is provided, it will - * return a function which lets you pass in the arguments as if it were a single - * function call. The signature is `(..args, callback)`. If invoked with any - * arguments, `callback` is required. - * @example - * - * async.applyEach([enableSearch, updateSchema], 'bucket', callback); - * - * // partial application example: - * async.each( - * buckets, - * async.applyEach([enableSearch, updateSchema]), - * callback - * ); - */ -var applyEach = applyEach$1(map); - -function doParallelLimit(fn) { - return function (obj, limit, iteratee, callback) { - return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback); - }; -} - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -var mapLimit = doParallelLimit(_asyncMap); - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -var mapSeries = doLimit(mapLimit, 1); - -/** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {Function} - If only the first argument is provided, it will return - * a function which lets you pass in the arguments as if it were a single - * function call. - */ -var applyEachSeries = applyEach$1(mapSeries); - -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -/** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns undefined - * @example - * - * async.auto({ - * // this function will just be passed a callback - * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), - * showData: ['readData', function(results, cb) { - * // results.readData is the file's contents - * // ... - * }] - * }, callback); - * - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * console.log('in write_file', JSON.stringify(results)); - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * console.log('in email_link', JSON.stringify(results)); - * // once the file is written let's email a link to it... - * // results.write_file contains the filename returned by write_file. - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * console.log('err = ', err); - * console.log('results = ', results); - * }); - */ -var auto = function (tasks, concurrency, callback) { - if (typeof concurrency === 'function') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = once(callback || noop); - var keys$$1 = keys(tasks); - var numTasks = keys$$1.length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - baseForOwn(tasks, function (task, key) { - if (!isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - arrayEach(dependencies, function (dependencyName) { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + - '` has a non-existent dependency `' + - dependencyName + '` in ' + - dependencies.join(', ')); - } - addListener(dependencyName, function () { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(function () { - runTask(key, task); - }); - } - - function processQueue() { - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while(readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - arrayEach(taskListeners, function (fn) { - fn(); - }); - processQueue(); - } - - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = onlyOnce(function(err, result) { - runningTasks--; - if (arguments.length > 2) { - result = slice(arguments, 1); - } - if (err) { - var safeResults = {}; - baseForOwn(results, function(val, rkey) { - safeResults[rkey] = val; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = wrapAsync(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - arrayEach(getDependents(currentTask), function (dependent) { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error( - 'async.auto cannot execute tasks due to a recursive dependency' - ); - } - } - - function getDependents(taskName) { - var result = []; - baseForOwn(tasks, function (task, key) { - if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) { - result.push(key); - } - }); - return result; - } -}; - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined; -var symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -/** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; - - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} - -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff'; -var rsComboMarksRange = '\\u0300-\\u036f'; -var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; -var rsComboSymbolsRange = '\\u20d0-\\u20ff'; -var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; -var rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/** Used to compose unicode character classes. */ -var rsAstralRange$1 = '\\ud800-\\udfff'; -var rsComboMarksRange$1 = '\\u0300-\\u036f'; -var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; -var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; -var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; -var rsVarRange$1 = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange$1 + ']'; -var rsCombo = '[' + rsComboRange$1 + ']'; -var rsFitz = '\\ud83c[\\udffb-\\udfff]'; -var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')'; -var rsNonAstral = '[^' + rsAstralRange$1 + ']'; -var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; -var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; -var rsZWJ$1 = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?'; -var rsOptVar = '[' + rsVarRange$1 + ']?'; -var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; -var rsSeq = rsOptVar + reOptMod + rsOptJoin; -var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** - * Removes leading and trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trim(' abc '); - * // => 'abc' - * - * _.trim('-_-abc-_-', '_-'); - * // => 'abc' - * - * _.map([' foo ', ' bar '], _.trim); - * // => ['foo', 'bar'] - */ -function trim(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrim, ''); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), - chrSymbols = stringToArray(chars), - start = charsStartIndex(strSymbols, chrSymbols), - end = charsEndIndex(strSymbols, chrSymbols) + 1; - - return castSlice(strSymbols, start, end).join(''); -} - -var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /(=.+)?(\s*)$/; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; - -function parseParams(func) { - func = func.toString().replace(STRIP_COMMENTS, ''); - func = func.match(FN_ARGS)[2].replace(' ', ''); - func = func ? func.split(FN_ARG_SPLIT) : []; - func = func.map(function (arg){ - return trim(arg.replace(FN_ARG, '')); - }); - return func; -} - -/** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ -function autoInject(tasks, callback) { - var newTasks = {}; - - baseForOwn(tasks, function (taskFn, key) { - var params; - var fnIsAsync = isAsync(taskFn); - var hasNoDeps = - (!fnIsAsync && taskFn.length === 1) || - (fnIsAsync && taskFn.length === 0); - - if (isArray(taskFn)) { - params = taskFn.slice(0, -1); - taskFn = taskFn[taskFn.length - 1]; - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = arrayMap(params, function (name) { - return results[name]; - }); - newArgs.push(taskCb); - wrapAsync(taskFn).apply(null, newArgs); - } - }); - - auto(newTasks, callback); -} - -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -function DLL() { - this.head = this.tail = null; - this.length = 0; -} - -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} - -DLL.prototype.removeLink = function(node) { - if (node.prev) node.prev.next = node.next; - else this.head = node.next; - if (node.next) node.next.prev = node.prev; - else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; -}; - -DLL.prototype.empty = function () { - while(this.head) this.shift(); - return this; -}; - -DLL.prototype.insertAfter = function(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode; - else this.tail = newNode; - node.next = newNode; - this.length += 1; -}; - -DLL.prototype.insertBefore = function(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode; - else this.head = newNode; - node.prev = newNode; - this.length += 1; -}; - -DLL.prototype.unshift = function(node) { - if (this.head) this.insertBefore(this.head, node); - else setInitial(this, node); -}; - -DLL.prototype.push = function(node) { - if (this.tail) this.insertAfter(this.tail, node); - else setInitial(this, node); -}; - -DLL.prototype.shift = function() { - return this.head && this.removeLink(this.head); -}; - -DLL.prototype.pop = function() { - return this.tail && this.removeLink(this.tail); -}; - -DLL.prototype.toArray = function () { - var arr = Array(this.length); - var curr = this.head; - for(var idx = 0; idx < this.length; idx++) { - arr[idx] = curr.data; - curr = curr.next; - } - return arr; -}; - -DLL.prototype.remove = function (testFn) { - var curr = this.head; - while(!!curr) { - var next = curr.next; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; -}; - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - - var _worker = wrapAsync(worker); - var numRunning = 0; - var workersList = []; - - var processingScheduled = false; - function _insert(data, insertAtFront, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!isArray(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return setImmediate$1(function() { - q.drain(); - }); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - callback: callback || noop - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(function() { - processingScheduled = false; - q.process(); - }); - } - } - - function _next(tasks) { - return function(err){ - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = baseIndexOf(workersList, task, 0); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback.apply(task, arguments); - - if (err != null) { - q.error(err, task.data); - } - } - - if (numRunning <= (q.concurrency - q.buffer) ) { - q.unsaturated(); - } - - if (q.idle()) { - q.drain(); - } - q.process(); - }; - } - - var isProcessing = false; - var q = { - _tasks: new DLL(), - concurrency: concurrency, - payload: payload, - saturated: noop, - unsaturated:noop, - buffer: concurrency / 4, - empty: noop, - drain: noop, - error: noop, - started: false, - paused: false, - push: function (data, callback) { - _insert(data, false, callback); - }, - kill: function () { - q.drain = noop; - q._tasks.empty(); - }, - unshift: function (data, callback) { - _insert(data, true, callback); - }, - remove: function (testFn) { - q._tasks.remove(testFn); - }, - process: function () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while(!q.paused && numRunning < q.concurrency && q._tasks.length){ - var tasks = [], data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - q.empty(); - } - - if (numRunning === q.concurrency) { - q.saturated(); - } - - var cb = onlyOnce(_next(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length: function () { - return q._tasks.length; - }, - running: function () { - return numRunning; - }, - workersList: function () { - return workersList; - }, - idle: function() { - return q._tasks.length + numRunning === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - setImmediate$1(q.process); - } - }; - return q; -} - -/** - * A cargo of tasks for the worker function to complete. Cargo inherits all of - * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. - * @typedef {Object} CargoObject - * @memberOf module:ControlFlow - * @property {Function} length - A function returning the number of items - * waiting to be processed. Invoke like `cargo.length()`. - * @property {number} payload - An `integer` for determining how many tasks - * should be process per round. This property can be changed after a `cargo` is - * created to alter the payload on-the-fly. - * @property {Function} push - Adds `task` to the `queue`. The callback is - * called once the `worker` has finished processing the task. Instead of a - * single task, an array of `tasks` can be submitted. The respective callback is - * used for every task in the list. Invoke like `cargo.push(task, [callback])`. - * @property {Function} saturated - A callback that is called when the - * `queue.length()` hits the concurrency and further tasks will be queued. - * @property {Function} empty - A callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - A callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke like `cargo.idle()`. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke like `cargo.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke like `cargo.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. - */ - -/** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i true - */ -function identity(value) { - return value; -} - -function _createTester(check, getResult) { - return function(eachfn, arr, iteratee, cb) { - cb = cb || noop; - var testPassed = false; - var testResult; - eachfn(arr, function(value, _, callback) { - iteratee(value, function(err, result) { - if (err) { - callback(err); - } else if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - callback(null, breakLoop); - } else { - callback(); - } - }); - }, function(err) { - if (err) { - cb(err); - } else { - cb(null, testPassed ? testResult : getResult(false)); - } - }); - }; -} - -function _findGetResult(v, x) { - return x; -} - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @example - * - * async.detect(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // result now equals the first file in the list that exists - * }); - */ -var detect = doParallel(_createTester(identity, _findGetResult)); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -var detectLimit = doParallelLimit(_createTester(identity, _findGetResult)); - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -var detectSeries = doLimit(detectLimit, 1); - -function consoleFunc(name) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - args.push(function (err/*, ...args*/) { - var args = slice(arguments, 1); - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } else if (console[name]) { - arrayEach(args, function (x) { - console[name](x); - }); - } - } - }); - wrapAsync(fn).apply(null, args); - }; -} - -/** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ -var dir = consoleFunc('dir'); - -/** - * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in - * the order of operations, the arguments `test` and `fn` are switched. - * - * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function. - * @name doDuring - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.during]{@link module:ControlFlow.during} - * @category Control Flow - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `fn`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error if one occurred, otherwise `null`. - */ -function doDuring(fn, test, callback) { - callback = onlyOnce(callback || noop); - var _fn = wrapAsync(fn); - var _test = wrapAsync(test); - - function next(err/*, ...args*/) { - if (err) return callback(err); - var args = slice(arguments, 1); - args.push(check); - _test.apply(this, args); - } - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - check(null, true); - -} - -/** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - */ -function doWhilst(iteratee, test, callback) { - callback = onlyOnce(callback || noop); - var _iteratee = wrapAsync(iteratee); - var next = function(err/*, ...args*/) { - if (err) return callback(err); - var args = slice(arguments, 1); - if (test.apply(this, args)) return _iteratee(next); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} - -/** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} test - synchronous truth test to perform after each - * execution of `iteratee`. Invoked with any non-error callback results of - * `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function doUntil(iteratee, test, callback) { - doWhilst(iteratee, function() { - return !test.apply(this, arguments); - }, callback); -} - -/** - * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that - * is passed a callback in the form of `function (err, truth)`. If error is - * passed to `test` or `fn`, the main callback is immediately called with the - * value of the error. - * - * @name during - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `fn`. Invoked with (callback). - * @param {AsyncFunction} fn - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `fn` has stopped. `callback` - * will be passed an error, if one occurred, otherwise `null`. - * @example - * - * var count = 0; - * - * async.during( - * function (callback) { - * return callback(null, count < 5); - * }, - * function (callback) { - * count++; - * setTimeout(callback, 1000); - * }, - * function (err) { - * // 5 seconds have passed - * } - * ); - */ -function during(test, fn, callback) { - callback = onlyOnce(callback || noop); - var _fn = wrapAsync(fn); - var _test = wrapAsync(test); - - function next(err) { - if (err) return callback(err); - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (!truth) return callback(null); - _fn(next); - } - - _test(check); -} - -function _withoutIndex(iteratee) { - return function (value, index, callback) { - return iteratee(value, callback); - }; -} - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * // assuming openFiles is an array of file names and saveFile is a function - * // to save the modified contents of that file: - * - * async.each(openFiles, saveFile, function(err){ - * // if any of the saves produced an error, err would equal that error - * }); - * - * // assuming openFiles is an array of file names - * async.each(openFiles, function(file, callback) { - * - * // Perform operation on file here. - * console.log('Processing file ' + file); - * - * if( file.length > 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit$1(coll, limit, iteratee, callback) { - _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); -} - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -var eachSeries = doLimit(eachLimit$1, 1); - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if (isAsync(fn)) return fn; - return initialParams(function (args, callback) { - var sync = true; - args.push(function () { - var innerArgs = arguments; - if (sync) { - setImmediate$1(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }); -} - -function notId(v) { - return !v; -} - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -var every = doParallel(_createTester(notId, notId)); - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -var everyLimit = doParallelLimit(_createTester(notId, notId)); - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -var everySeries = doLimit(everyLimit, 1); - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, function (x, index, callback) { - iteratee(x, function (err, v) { - truthValues[index] = !!v; - callback(err); - }); - }, function (err) { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, function (x, index, callback) { - iteratee(x, function (err, v) { - if (err) { - callback(err); - } else { - if (v) { - results.push({index: index, value: x}); - } - callback(); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(null, arrayMap(results.sort(function (a, b) { - return a.index - b.index; - }), baseProperty('value'))); - } - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = isArrayLike(coll) ? filterArray : filterGeneric; - filter(eachfn, coll, wrapAsync(iteratee), callback || noop); -} - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -var filter = doParallel(_filter); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var filterLimit = doParallelLimit(_filter); - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -var filterSeries = doLimit(filterLimit, 1); - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = onlyOnce(errback || noop); - var task = wrapAsync(ensureAsync(fn)); - - function next(err) { - if (err) return done(err); - task(next); - } - next(); -} - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -var groupByLimit = function(coll, limit, iteratee, callback) { - callback = callback || noop; - var _iteratee = wrapAsync(iteratee); - mapLimit(coll, limit, function(val, callback) { - _iteratee(val, function(err, key) { - if (err) return callback(err); - return callback(null, {key: key, val: val}); - }); - }, function(err, mapResults) { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var key = mapResults[i].key; - var val = mapResults[i].val; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -}; - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @example - * - * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { - * db.findById(userId, function(err, user) { - * if (err) return callback(err); - * return callback(null, user.age); - * }); - * }, function(err, result) { - * // result is object containing the userIds grouped by age - * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; - * }); - */ -var groupBy = doLimit(groupByLimit, Infinity); - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -var groupBySeries = doLimit(groupByLimit, 1); - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -var log = consoleFunc('log'); - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback || noop); - var newObj = {}; - var _iteratee = wrapAsync(iteratee); - eachOfLimit(obj, limit, function(val, key, next) { - _iteratee(val, key, function (err, result) { - if (err) return next(err); - newObj[key] = result; - next(); - }); - }, function (err) { - callback(err, newObj); - }); -} - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @example - * - * async.mapValues({ - * f1: 'file1', - * f2: 'file2', - * f3: 'file3' - * }, function (file, key, callback) { - * fs.stat(file, callback); - * }, function(err, result) { - * // result is now a map of stats for each file, e.g. - * // { - * // f1: [stats for file1], - * // f2: [stats for file2], - * // f3: [stats for file3] - * // } - * }); - */ - -var mapValues = doLimit(mapValuesLimit, Infinity); - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -var mapValuesSeries = doLimit(mapValuesLimit, 1); - -function has(obj, key) { - return key in obj; -} - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher) { - var memo = Object.create(null); - var queues = Object.create(null); - hasher = hasher || identity; - var _fn = wrapAsync(fn); - var memoized = initialParams(function memoized(args, callback) { - var key = hasher.apply(null, args); - if (has(memo, key)) { - setImmediate$1(function() { - callback.apply(null, memo[key]); - }); - } else if (has(queues, key)) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn.apply(null, args.concat(function(/*args*/) { - var args = slice(arguments); - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer$1; - -if (hasNextTick) { - _defer$1 = process.nextTick; -} else if (hasSetImmediate) { - _defer$1 = setImmediate; -} else { - _defer$1 = fallback; -} - -var nextTick = wrap(_defer$1); - -function _parallel(eachfn, tasks, callback) { - callback = callback || noop; - var results = isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - wrapAsync(task)(function (err, result) { - if (arguments.length > 2) { - result = slice(arguments, 1); - } - results[key] = result; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * - * @example - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // optional callback - * function(err, results) { - * // the results array will equal ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equals to: {one: 1, two: 2} - * }); - */ -function parallelLimit(tasks, callback) { - _parallel(eachOf, tasks, callback); -} - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - */ -function parallelLimit$1(tasks, limit, callback) { - _parallel(_eachOfLimit(limit), tasks, callback); -} - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Object} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {Function} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {Function} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a callback that is called when the number of - * running workers hits the `concurrency` limit, and further tasks will be - * queued. - * @property {Function} unsaturated - a callback that is called when the number - * of running workers is less than the `concurrency` & `buffer` limits, and - * further tasks will not be queued. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - a callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} error - a callback that is called when a task errors. - * Has the signature `function(error, task)`. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain = function() { - * console.log('all items have been processed'); - * }; - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * q.push({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ -var queue$1 = function (worker, concurrency) { - var _worker = wrapAsync(worker); - return queue(function (items, cb) { - _worker(items[0], cb); - }, concurrency, 1); -}; - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ -var priorityQueue = function(worker, concurrency) { - // Start with a normal queue - var q = queue$1(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function(data, priority, callback) { - if (callback == null) callback = noop; - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!isArray(data)) { - data = [data]; - } - if (data.length === 0) { - // call drain immediately if there are no tasks - return setImmediate$1(function() { - q.drain(); - }); - } - - priority = priority || 0; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority: priority, - callback: callback - }; - - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - } - setImmediate$1(q.process); - }; - - // Remove unshift function - delete q.unshift; - - return q; -}; - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = once(callback || noop); - if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - wrapAsync(tasks[i])(callback); - } -} - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight (array, memo, iteratee, callback) { - var reversed = slice(array).reverse(); - reduce(reversed, memo, iteratee, callback); -} - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { - args.push(function callback(error, cbArg) { - if (error) { - reflectCallback(null, { error: error }); - } else { - var value; - if (arguments.length <= 2) { - value = cbArg; - } else { - value = slice(arguments, 1); - } - reflectCallback(null, { value: value }); - } - }); - - return _fn.apply(this, args); - }); -} - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if (isArray(tasks)) { - results = arrayMap(tasks, reflect); - } else { - results = {}; - baseForOwn(tasks, function(task, key) { - results[key] = reflect.call(this, task); - }); - } - return results; -} - -function reject$1(eachfn, arr, iteratee, callback) { - _filter(eachfn, arr, function(value, cb) { - iteratee(value, function(err, v) { - cb(err, !v); - }); - }, callback); -} - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.reject(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of missing files - * createFiles(results); - * }); - */ -var reject = doParallel(reject$1); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var rejectLimit = doParallelLimit(reject$1); - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -var rejectSeries = doLimit(rejectLimit, 1); - -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant$1(value) { - return function() { - return value; - }; -} - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -function retry(opts, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant$1(DEFAULT_INTERVAL) - }; - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? - t.interval : - constant$1(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || noop; - task = opts; - } else { - parseTimes(options, opts); - callback = callback || noop; - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = wrapAsync(task); - - var attempt = 1; - function retryAttempt() { - _task(function(err) { - if (err && attempt++ < options.times && - (typeof options.errorFilter != 'function' || - options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt)); - } else { - callback.apply(null, arguments); - } - }); - } - - retryAttempt(); -} - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ -var retryable = function (opts, task) { - if (!task) { - task = opts; - opts = null; - } - var _task = wrapAsync(task); - return initialParams(function (args, callback) { - function taskFn(cb) { - _task.apply(null, args.concat(cb)); - } - - if (opts) retry(opts, taskFn, callback); - else retry(taskFn, callback); - - }); -}; - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @example - * async.series([ - * function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }, - * function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * } - * ], - * // optional callback - * function(err, results) { - * // results is now equal to ['one', 'two'] - * }); - * - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback){ - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equal to: {one: 1, two: 2} - * }); - */ -function series(tasks, callback) { - _parallel(eachOfSeries, tasks, callback); -} - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -var some = doParallel(_createTester(Boolean, identity)); - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -var someLimit = doParallelLimit(_createTester(Boolean, identity)); - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -var someSeries = doLimit(someLimit, 1); - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @example - * - * async.sortBy(['file1','file2','file3'], function(file, callback) { - * fs.stat(file, function(err, stats) { - * callback(err, stats.mtime); - * }); - * }, function(err, results) { - * // results is now the original array of files sorted by - * // modified date - * }); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x); - * }, function(err,result) { - * // result callback - * }); - * - * // descending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x*-1); //<- x*-1 instead of x, turns the order around - * }, function(err,result) { - * // result callback - * }); - */ -function sortBy (coll, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - map(coll, function (x, callback) { - _iteratee(x, function (err, criteria) { - if (err) return callback(err); - callback(null, {value: x, criteria: criteria}); - }); - }, function (err, results) { - if (err) return callback(err); - callback(null, arrayMap(results.sort(comparator), baseProperty('value'))); - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = wrapAsync(asyncFn); - - return initialParams(function (args, callback) { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push(function () { - if (!timedOut) { - callback.apply(null, arguments); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn.apply(null, args); - }); -} - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; -var nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - */ -function timeLimit(count, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - mapLimit(baseRange(0, count, 1), limit, _iteratee, callback); -} - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -var times = doLimit(timeLimit, Infinity); - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - */ -var timesSeries = doLimit(timeLimit, 1); - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in series, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @example - * - * async.transform([1,2,3], function(acc, item, index, callback) { - * // pointless async: - * process.nextTick(function() { - * acc.push(item * 2) - * callback(null) - * }); - * }, function(err, result) { - * // result is now equal to [2, 4, 6] - * }); - * - * @example - * - * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { - * setImmediate(function () { - * obj[key] = val * 2; - * callback(); - * }) - * }, function (err, result) { - * // result is equal to {a: 2, b: 4, c: 6} - * }) - */ -function transform (coll, accumulator, iteratee, callback) { - if (arguments.length <= 3) { - callback = iteratee; - iteratee = accumulator; - accumulator = isArray(coll) ? [] : {}; - } - callback = once(callback || noop); - var _iteratee = wrapAsync(iteratee); - - eachOf(coll, function(v, k, cb) { - _iteratee(accumulator, v, k, cb); - }, function(err) { - callback(err, accumulator); - }); -} - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - callback = callback || noop; - eachSeries(tasks, function(task, callback) { - wrapAsync(task)(function (err, res/*, ...args*/) { - if (arguments.length > 2) { - result = slice(arguments, 1); - } else { - result = res; - } - error = err; - callback(!err); - }); - }, function () { - callback(error, result); - }); -} - -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; -} - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns undefined - * @example - * - * var count = 0; - * async.whilst( - * function() { return count < 5; }, - * function(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = onlyOnce(callback || noop); - var _iteratee = wrapAsync(iteratee); - if (!test()) return callback(null); - var next = function(err/*, ...args*/) { - if (err) return callback(err); - if (test()) return _iteratee(next); - var args = slice(arguments, 1); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function until(test, iteratee, callback) { - whilst(function() { - return !test.apply(this, arguments); - }, iteratee, callback); -} - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ -var waterfall = function(tasks, callback) { - callback = once(callback || noop); - if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = wrapAsync(tasks[taskIndex++]); - args.push(onlyOnce(next)); - task.apply(null, args); - } - - function next(err/*, ...args*/) { - if (err || taskIndex === tasks.length) { - return callback.apply(null, arguments); - } - nextTask(slice(arguments, 1)); - } - - nextTask([]); -}; - -/** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -/** - * Async is a utility module which provides straight-forward, powerful functions - * for working with asynchronous JavaScript. Although originally designed for - * use with [Node.js](http://nodejs.org) and installable via - * `npm install --save async`, it can also be used directly in the browser. - * @module async - * @see AsyncFunction - */ - - -/** - * A collection of `async` functions for manipulating collections, such as - * arrays and objects. - * @module Collections - */ - -/** - * A collection of `async` functions for controlling the flow through a script. - * @module ControlFlow - */ - -/** - * A collection of `async` utility functions. - * @module Utils - */ - -var index = { - apply: apply, - applyEach: applyEach, - applyEachSeries: applyEachSeries, - asyncify: asyncify, - auto: auto, - autoInject: autoInject, - cargo: cargo, - compose: compose, - concat: concat, - concatLimit: concatLimit, - concatSeries: concatSeries, - constant: constant, - detect: detect, - detectLimit: detectLimit, - detectSeries: detectSeries, - dir: dir, - doDuring: doDuring, - doUntil: doUntil, - doWhilst: doWhilst, - during: during, - each: eachLimit, - eachLimit: eachLimit$1, - eachOf: eachOf, - eachOfLimit: eachOfLimit, - eachOfSeries: eachOfSeries, - eachSeries: eachSeries, - ensureAsync: ensureAsync, - every: every, - everyLimit: everyLimit, - everySeries: everySeries, - filter: filter, - filterLimit: filterLimit, - filterSeries: filterSeries, - forever: forever, - groupBy: groupBy, - groupByLimit: groupByLimit, - groupBySeries: groupBySeries, - log: log, - map: map, - mapLimit: mapLimit, - mapSeries: mapSeries, - mapValues: mapValues, - mapValuesLimit: mapValuesLimit, - mapValuesSeries: mapValuesSeries, - memoize: memoize, - nextTick: nextTick, - parallel: parallelLimit, - parallelLimit: parallelLimit$1, - priorityQueue: priorityQueue, - queue: queue$1, - race: race, - reduce: reduce, - reduceRight: reduceRight, - reflect: reflect, - reflectAll: reflectAll, - reject: reject, - rejectLimit: rejectLimit, - rejectSeries: rejectSeries, - retry: retry, - retryable: retryable, - seq: seq, - series: series, - setImmediate: setImmediate$1, - some: some, - someLimit: someLimit, - someSeries: someSeries, - sortBy: sortBy, - timeout: timeout, - times: times, - timesLimit: timeLimit, - timesSeries: timesSeries, - transform: transform, - tryEach: tryEach, - unmemoize: unmemoize, - until: until, - waterfall: waterfall, - whilst: whilst, - - // aliases - all: every, - allLimit: everyLimit, - allSeries: everySeries, - any: some, - anyLimit: someLimit, - anySeries: someSeries, - find: detect, - findLimit: detectLimit, - findSeries: detectSeries, - forEach: eachLimit, - forEachSeries: eachSeries, - forEachLimit: eachLimit$1, - forEachOf: eachOf, - forEachOfSeries: eachOfSeries, - forEachOfLimit: eachOfLimit, - inject: reduce, - foldl: reduce, - foldr: reduceRight, - select: filter, - selectLimit: filterLimit, - selectSeries: filterSeries, - wrapSync: asyncify -}; - -exports['default'] = index; -exports.apply = apply; -exports.applyEach = applyEach; -exports.applyEachSeries = applyEachSeries; -exports.asyncify = asyncify; -exports.auto = auto; -exports.autoInject = autoInject; -exports.cargo = cargo; -exports.compose = compose; -exports.concat = concat; -exports.concatLimit = concatLimit; -exports.concatSeries = concatSeries; -exports.constant = constant; -exports.detect = detect; -exports.detectLimit = detectLimit; -exports.detectSeries = detectSeries; -exports.dir = dir; -exports.doDuring = doDuring; -exports.doUntil = doUntil; -exports.doWhilst = doWhilst; -exports.during = during; -exports.each = eachLimit; -exports.eachLimit = eachLimit$1; -exports.eachOf = eachOf; -exports.eachOfLimit = eachOfLimit; -exports.eachOfSeries = eachOfSeries; -exports.eachSeries = eachSeries; -exports.ensureAsync = ensureAsync; -exports.every = every; -exports.everyLimit = everyLimit; -exports.everySeries = everySeries; -exports.filter = filter; -exports.filterLimit = filterLimit; -exports.filterSeries = filterSeries; -exports.forever = forever; -exports.groupBy = groupBy; -exports.groupByLimit = groupByLimit; -exports.groupBySeries = groupBySeries; -exports.log = log; -exports.map = map; -exports.mapLimit = mapLimit; -exports.mapSeries = mapSeries; -exports.mapValues = mapValues; -exports.mapValuesLimit = mapValuesLimit; -exports.mapValuesSeries = mapValuesSeries; -exports.memoize = memoize; -exports.nextTick = nextTick; -exports.parallel = parallelLimit; -exports.parallelLimit = parallelLimit$1; -exports.priorityQueue = priorityQueue; -exports.queue = queue$1; -exports.race = race; -exports.reduce = reduce; -exports.reduceRight = reduceRight; -exports.reflect = reflect; -exports.reflectAll = reflectAll; -exports.reject = reject; -exports.rejectLimit = rejectLimit; -exports.rejectSeries = rejectSeries; -exports.retry = retry; -exports.retryable = retryable; -exports.seq = seq; -exports.series = series; -exports.setImmediate = setImmediate$1; -exports.some = some; -exports.someLimit = someLimit; -exports.someSeries = someSeries; -exports.sortBy = sortBy; -exports.timeout = timeout; -exports.times = times; -exports.timesLimit = timeLimit; -exports.timesSeries = timesSeries; -exports.transform = transform; -exports.tryEach = tryEach; -exports.unmemoize = unmemoize; -exports.until = until; -exports.waterfall = waterfall; -exports.whilst = whilst; -exports.all = every; -exports.allLimit = everyLimit; -exports.allSeries = everySeries; -exports.any = some; -exports.anyLimit = someLimit; -exports.anySeries = someSeries; -exports.find = detect; -exports.findLimit = detectLimit; -exports.findSeries = detectSeries; -exports.forEach = eachLimit; -exports.forEachSeries = eachSeries; -exports.forEachLimit = eachLimit$1; -exports.forEachOf = eachOf; -exports.forEachOfSeries = eachOfSeries; -exports.forEachOfLimit = eachOfLimit; -exports.inject = reduce; -exports.foldl = reduce; -exports.foldr = reduceRight; -exports.select = filter; -exports.selectLimit = filterLimit; -exports.selectSeries = filterSeries; -exports.wrapSync = asyncify; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/async/dist/async.min.js b/node_modules/async/dist/async.min.js deleted file mode 100644 index 0b9e113..0000000 --- a/node_modules/async/dist/async.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t){t|=0;for(var e=Math.max(n.length-t,0),r=Array(e),u=0;u-1&&n%1==0&&n<=Tt}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e-1&&n%1==0&&nu?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var i=Array(u);++r=r?n:Z(n,t,e)}function tn(n,t){for(var e=n.length;e--&&J(t,n[e],0)>-1;);return e}function en(n,t){for(var e=-1,r=n.length;++e-1;);return e}function rn(n){return n.split("")}function un(n){return Xe.test(n)}function on(n){return n.match(mr)||[]}function cn(n){return un(n)?on(n):rn(n)}function fn(n){return null==n?"":Y(n)}function an(n,t,e){if(n=fn(n),n&&(e||void 0===t))return n.replace(gr,"");if(!n||!(t=Y(t)))return n;var r=cn(n),u=cn(t),i=en(r,u),o=tn(r,u)+1;return nn(r,i,o).join("")}function ln(n){return n=n.toString().replace(kr,""),n=n.match(br)[2].replace(" ",""),n=n?n.split(jr):[],n=n.map(function(n){return an(n.replace(Sr,""))})}function sn(n,t){var e={};N(n,function(n,t){function r(t,e){var r=K(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,i=f(n),o=!i&&1===n.length||i&&0===n.length;if(Pt(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(o)e[t]=n;else{if(u=ln(n),0===n.length&&!i&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");i||u.pop(),e[t]=u.concat(r)}}),Ve(e,t)}function pn(){this.head=this.tail=null,this.length=0}function hn(n,t){n.length=1,n.head=n.tail=t}function yn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(s.started=!0,Pt(n)||(n=[n]),0===n.length&&s.idle())return lt(function(){s.drain()});for(var r=0,u=n.length;r0&&c.splice(i,1),u.callback.apply(u,arguments),null!=t&&s.error(t,u.data)}o<=s.concurrency-s.buffer&&s.unsaturated(),s.idle()&&s.drain(),s.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var i=a(n),o=0,c=[],f=!1,l=!1,s={_tasks:new pn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){s.drain=m,s._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){s._tasks.remove(n)},process:function(){if(!l){for(l=!0;!s.paused&&o2&&(i=t(arguments,1)),u[e]=i,r(n)})},function(n){r(n,u)})}function Dn(n,t){Vn(Fe,n,t)}function Rn(n,t,e){Vn(q(t),n,e)}function Cn(n,t){if(t=g(t||m),!Pt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;er?1:0}var u=a(t);Ie(n,function(n,t){u(n,function(e,r){return e?t(e):void t(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,K(t.sort(r),Bn("value")))})}function Xn(n,t,e){var r=a(n);return ct(function(u,i){function o(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,i(r)}var c,f=!1;u.push(function(){f||(i.apply(null,arguments),clearTimeout(c))}),c=setTimeout(o,t),r.apply(null,u)})}function Yn(n,t,e,r){for(var u=-1,i=iu(uu((t-n)/(e||1)),0),o=Array(i);i--;)o[r?i:++u]=n,n+=e;return o}function Zn(n,t,e,r){var u=a(e);Ue(Yn(0,n,1),t,u,r)}function nt(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=Pt(n)?[]:{}),r=g(r||m);var u=a(e);Fe(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function tt(n,e){var r,u=null;e=e||m,Ur(n,function(n,e){a(n)(function(n,i){r=arguments.length>2?t(arguments,1):i,u=n,e(!n)})},function(){e(u,r)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,e,r){r=U(r||m);var u=a(e);if(!n())return r(null);var i=function(e){if(e)return r(e);if(n())return u(i);var o=t(arguments,1);r.apply(null,[null].concat(o))};u(i)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var it,ot=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},ct=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},ft="function"==typeof setImmediate&&setImmediate,at="object"==typeof process&&"function"==typeof process.nextTick;it=ft?setImmediate:at?process.nextTick:r;var lt=u(it),st="function"==typeof Symbol,pt="object"==typeof global&&global&&global.Object===Object&&global,ht="object"==typeof self&&self&&self.Object===Object&&self,yt=pt||ht||Function("return this")(),vt=yt.Symbol,dt=Object.prototype,mt=dt.hasOwnProperty,gt=dt.toString,bt=vt?vt.toStringTag:void 0,jt=Object.prototype,St=jt.toString,kt="[object Null]",Lt="[object Undefined]",Ot=vt?vt.toStringTag:void 0,wt="[object AsyncFunction]",xt="[object Function]",Et="[object GeneratorFunction]",At="[object Proxy]",Tt=9007199254740991,_t={},Bt="function"==typeof Symbol&&Symbol.iterator,Ft=function(n){return Bt&&n[Bt]&&n[Bt]()},It="[object Arguments]",Mt=Object.prototype,Ut=Mt.hasOwnProperty,qt=Mt.propertyIsEnumerable,zt=S(function(){return arguments}())?S:function(n){return j(n)&&Ut.call(n,"callee")&&!qt.call(n,"callee")},Pt=Array.isArray,Vt="object"==typeof n&&n&&!n.nodeType&&n,Dt=Vt&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===Vt,Ct=Rt?yt.Buffer:void 0,$t=Ct?Ct.isBuffer:void 0,Wt=$t||k,Nt=9007199254740991,Qt=/^(?:0|[1-9]\d*)$/,Gt="[object Arguments]",Ht="[object Array]",Jt="[object Boolean]",Kt="[object Date]",Xt="[object Error]",Yt="[object Function]",Zt="[object Map]",ne="[object Number]",te="[object Object]",ee="[object RegExp]",re="[object Set]",ue="[object String]",ie="[object WeakMap]",oe="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",ae="[object Float64Array]",le="[object Int8Array]",se="[object Int16Array]",pe="[object Int32Array]",he="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",de="[object Uint32Array]",me={};me[fe]=me[ae]=me[le]=me[se]=me[pe]=me[he]=me[ye]=me[ve]=me[de]=!0,me[Gt]=me[Ht]=me[oe]=me[Jt]=me[ce]=me[Kt]=me[Xt]=me[Yt]=me[Zt]=me[ne]=me[te]=me[ee]=me[re]=me[ue]=me[ie]=!1;var ge="object"==typeof n&&n&&!n.nodeType&&n,be=ge&&"object"==typeof module&&module&&!module.nodeType&&module,je=be&&be.exports===ge,Se=je&&pt.process,ke=function(){try{var n=be&&be.require&&be.require("util").types;return n?n:Se&&Se.binding&&Se.binding("util")}catch(n){}}(),Le=ke&&ke.isTypedArray,Oe=Le?w(Le):O,we=Object.prototype,xe=we.hasOwnProperty,Ee=Object.prototype,Ae=A(Object.keys,Object),Te=Object.prototype,_e=Te.hasOwnProperty,Be=P(z,1/0),Fe=function(n,t,e){var r=d(n)?V:Be;r(n,a(t),e)},Ie=D(R),Me=l(Ie),Ue=C(R),qe=P(Ue,1),ze=l(qe),Pe=W(),Ve=function(n,e,r){function u(n,t){j.push(function(){f(n,t)})}function i(){if(0===j.length&&0===v)return r(null,y);for(;j.length&&v2&&(u=t(arguments,1)),e){var i={};N(y,function(n,t){i[t]=n}),i[n]=u,d=!0,b=Object.create(null),r(e,i)}else y[n]=u,c(n)});v++;var i=a(e[e.length-1]);e.length>1?i(y,u):i(u)}}function l(){for(var n,t=0;S.length;)n=S.pop(),t++,$(s(n),function(n){0===--k[n]&&S.push(n)});if(t!==h)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function s(t){var e=[];return N(n,function(n,r){Pt(n)&&J(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var p=_(n),h=p.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,b=Object.create(null),j=[],S=[],k={};N(n,function(t,e){if(!Pt(t))return u(e,[t]),void S.push(e);var r=t.slice(0,t.length-1),i=r.length;return 0===i?(u(e,t),void S.push(e)):(k[e]=i,void $(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));o(c,function(){i--,0===i&&u(e,t)})}))}),l(),i()},De="[object Symbol]",Re=1/0,Ce=vt?vt.prototype:void 0,$e=Ce?Ce.toString:void 0,We="\\ud800-\\udfff",Ne="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",Ge="\\u20d0-\\u20ff",He=Ne+Qe+Ge,Je="\\ufe0e\\ufe0f",Ke="\\u200d",Xe=RegExp("["+Ke+We+He+Je+"]"),Ye="\\ud800-\\udfff",Ze="\\u0300-\\u036f",nr="\\ufe20-\\ufe2f",tr="\\u20d0-\\u20ff",er=Ze+nr+tr,rr="\\ufe0e\\ufe0f",ur="["+Ye+"]",ir="["+er+"]",or="\\ud83c[\\udffb-\\udfff]",cr="(?:"+ir+"|"+or+")",fr="[^"+Ye+"]",ar="(?:\\ud83c[\\udde6-\\uddff]){2}",lr="[\\ud800-\\udbff][\\udc00-\\udfff]",sr="\\u200d",pr=cr+"?",hr="["+rr+"]?",yr="(?:"+sr+"(?:"+[fr,ar,lr].join("|")+")"+hr+pr+")*",vr=hr+pr+yr,dr="(?:"+[fr+ir+"?",ir,ar,lr,ur].join("|")+")",mr=RegExp(or+"(?="+or+")|"+dr+vr,"g"),gr=/^\s+|\s+$/g,br=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,jr=/,/,Sr=/(=.+)?(\s*)$/,kr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;pn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},pn.prototype.empty=function(){for(;this.head;)this.shift();return this},pn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},pn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},pn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):hn(this,n)},pn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):hn(this,n)},pn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},pn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},pn.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e=u.priority;)u=u.next;for(var i=0,o=n.length;i 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachLimit.js b/node_modules/async/eachLimit.js deleted file mode 100644 index fff721b..0000000 --- a/node_modules/async/eachLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOf.js b/node_modules/async/eachOf.js deleted file mode 100644 index 055b9bd..0000000 --- a/node_modules/async/eachOf.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -}; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOfLimit.js b/node_modules/async/eachOfLimit.js deleted file mode 100644 index 30a1329..0000000 --- a/node_modules/async/eachOfLimit.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachOfLimit; - -var _eachOfLimit2 = require('./internal/eachOfLimit'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachOfSeries.js b/node_modules/async/eachOfSeries.js deleted file mode 100644 index 9dfd711..0000000 --- a/node_modules/async/eachOfSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/eachSeries.js b/node_modules/async/eachSeries.js deleted file mode 100644 index 55c7840..0000000 --- a/node_modules/async/eachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/ensureAsync.js b/node_modules/async/ensureAsync.js deleted file mode 100644 index 1f57aec..0000000 --- a/node_modules/async/ensureAsync.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ensureAsync; - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ -function ensureAsync(fn) { - if ((0, _wrapAsync.isAsync)(fn)) return fn; - return (0, _initialParams2.default)(function (args, callback) { - var sync = true; - args.push(function () { - var innerArgs = arguments; - if (sync) { - (0, _setImmediate2.default)(function () { - callback.apply(null, innerArgs); - }); - } else { - callback.apply(null, innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/every.js b/node_modules/async/every.js deleted file mode 100644 index d0565b0..0000000 --- a/node_modules/async/every.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @example - * - * async.every(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then every file exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/everyLimit.js b/node_modules/async/everyLimit.js deleted file mode 100644 index a1a759a..0000000 --- a/node_modules/async/everyLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _notId = require('./internal/notId'); - -var _notId2 = _interopRequireDefault(_notId); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_notId2.default, _notId2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/everySeries.js b/node_modules/async/everySeries.js deleted file mode 100644 index 23bfebb..0000000 --- a/node_modules/async/everySeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_everyLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filter.js b/node_modules/async/filter.js deleted file mode 100644 index 54772d5..0000000 --- a/node_modules/async/filter.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -exports.default = (0, _doParallel2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filterLimit.js b/node_modules/async/filterLimit.js deleted file mode 100644 index 06216f7..0000000 --- a/node_modules/async/filterLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/filterSeries.js b/node_modules/async/filterSeries.js deleted file mode 100644 index e48d966..0000000 --- a/node_modules/async/filterSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -exports.default = (0, _doLimit2.default)(_filterLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/find.js b/node_modules/async/find.js deleted file mode 100644 index db46783..0000000 --- a/node_modules/async/find.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @example - * - * async.detect(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // result now equals the first file in the list that exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/findLimit.js b/node_modules/async/findLimit.js deleted file mode 100644 index 6bf6560..0000000 --- a/node_modules/async/findLimit.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _findGetResult = require('./internal/findGetResult'); - -var _findGetResult2 = _interopRequireDefault(_findGetResult); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(_identity2.default, _findGetResult2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/findSeries.js b/node_modules/async/findSeries.js deleted file mode 100644 index 6fe16c9..0000000 --- a/node_modules/async/findSeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - */ -exports.default = (0, _doLimit2.default)(_detectLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/foldl.js b/node_modules/async/foldl.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/foldl.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/foldr.js b/node_modules/async/foldr.js deleted file mode 100644 index 3d17d32..0000000 --- a/node_modules/async/foldr.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = (0, _slice2.default)(array).reverse(); - (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEach.js b/node_modules/async/forEach.js deleted file mode 100644 index 4b20af3..0000000 --- a/node_modules/async/forEach.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * // assuming openFiles is an array of file names and saveFile is a function - * // to save the modified contents of that file: - * - * async.each(openFiles, saveFile, function(err){ - * // if any of the saves produced an error, err would equal that error - * }); - * - * // assuming openFiles is an array of file names - * async.each(openFiles, function(file, callback) { - * - * // Perform operation on file here. - * console.log('Processing file ' + file); - * - * if( file.length > 32 ) { - * console.log('This file name is too long'); - * callback('File name too long'); - * } else { - * // Do work to process file here - * console.log('File processed'); - * callback(); - * } - * }, function(err) { - * // if any of the file processing produced an error, err would equal that error - * if( err ) { - * // One of the iterations produced an error. - * // All processing will now stop. - * console.log('A file failed to process'); - * } else { - * console.log('All files have been processed successfully'); - * } - * }); - */ -function eachLimit(coll, iteratee, callback) { - (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachLimit.js b/node_modules/async/forEachLimit.js deleted file mode 100644 index fff721b..0000000 --- a/node_modules/async/forEachLimit.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _withoutIndex = require('./internal/withoutIndex'); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOf.js b/node_modules/async/forEachOf.js deleted file mode 100644 index 055b9bd..0000000 --- a/node_modules/async/forEachOf.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -}; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = require('./internal/breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var index = 0, - completed = 0, - length = coll.length; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @example - * - * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; - * var configs = {}; - * - * async.forEachOf(obj, function (value, key, callback) { - * fs.readFile(__dirname + value, "utf8", function (err, data) { - * if (err) return callback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * }, function (err) { - * if (err) console.error(err.message); - * // configs is now a map of JSON data - * doSomethingWith(configs); - * }); - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOfLimit.js b/node_modules/async/forEachOfLimit.js deleted file mode 100644 index 30a1329..0000000 --- a/node_modules/async/forEachOfLimit.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = eachOfLimit; - -var _eachOfLimit2 = require('./internal/eachOfLimit'); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -function eachOfLimit(coll, limit, iteratee, callback) { - (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachOfSeries.js b/node_modules/async/forEachOfSeries.js deleted file mode 100644 index 9dfd711..0000000 --- a/node_modules/async/forEachOfSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forEachSeries.js b/node_modules/async/forEachSeries.js deleted file mode 100644 index 55c7840..0000000 --- a/node_modules/async/forEachSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - */ -exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/forever.js b/node_modules/async/forever.js deleted file mode 100644 index 6c7b8a4..0000000 --- a/node_modules/async/forever.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = forever; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _ensureAsync = require('./ensureAsync'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ -function forever(fn, errback) { - var done = (0, _onlyOnce2.default)(errback || _noop2.default); - var task = (0, _wrapAsync2.default)((0, _ensureAsync2.default)(fn)); - - function next(err) { - if (err) return done(err); - task(next); - } - next(); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupBy.js b/node_modules/async/groupBy.js deleted file mode 100644 index 755cba7..0000000 --- a/node_modules/async/groupBy.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @example - * - * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { - * db.findById(userId, function(err, user) { - * if (err) return callback(err); - * return callback(null, user.age); - * }); - * }, function(err, result) { - * // result is object containing the userIds grouped by age - * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; - * }); - */ -exports.default = (0, _doLimit2.default)(_groupByLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupByLimit.js b/node_modules/async/groupByLimit.js deleted file mode 100644 index fec13f8..0000000 --- a/node_modules/async/groupByLimit.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll, limit, iteratee, callback) { - callback = callback || _noop2.default; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _mapLimit2.default)(coll, limit, function (val, callback) { - _iteratee(val, function (err, key) { - if (err) return callback(err); - return callback(null, { key: key, val: val }); - }); - }, function (err, mapResults) { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var key = mapResults[i].key; - var val = mapResults[i].val; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); -}; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -; -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/groupBySeries.js b/node_modules/async/groupBySeries.js deleted file mode 100644 index b94805e..0000000 --- a/node_modules/async/groupBySeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - */ -exports.default = (0, _doLimit2.default)(_groupByLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/index.js b/node_modules/async/index.js deleted file mode 100644 index c39d8d8..0000000 --- a/node_modules/async/index.js +++ /dev/null @@ -1,582 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.wrapSync = exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.during = exports.doWhilst = exports.doUntil = exports.doDuring = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.applyEachSeries = exports.applyEach = exports.apply = undefined; - -var _apply = require('./apply'); - -var _apply2 = _interopRequireDefault(_apply); - -var _applyEach = require('./applyEach'); - -var _applyEach2 = _interopRequireDefault(_applyEach); - -var _applyEachSeries = require('./applyEachSeries'); - -var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries); - -var _asyncify = require('./asyncify'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -var _auto = require('./auto'); - -var _auto2 = _interopRequireDefault(_auto); - -var _autoInject = require('./autoInject'); - -var _autoInject2 = _interopRequireDefault(_autoInject); - -var _cargo = require('./cargo'); - -var _cargo2 = _interopRequireDefault(_cargo); - -var _compose = require('./compose'); - -var _compose2 = _interopRequireDefault(_compose); - -var _concat = require('./concat'); - -var _concat2 = _interopRequireDefault(_concat); - -var _concatLimit = require('./concatLimit'); - -var _concatLimit2 = _interopRequireDefault(_concatLimit); - -var _concatSeries = require('./concatSeries'); - -var _concatSeries2 = _interopRequireDefault(_concatSeries); - -var _constant = require('./constant'); - -var _constant2 = _interopRequireDefault(_constant); - -var _detect = require('./detect'); - -var _detect2 = _interopRequireDefault(_detect); - -var _detectLimit = require('./detectLimit'); - -var _detectLimit2 = _interopRequireDefault(_detectLimit); - -var _detectSeries = require('./detectSeries'); - -var _detectSeries2 = _interopRequireDefault(_detectSeries); - -var _dir = require('./dir'); - -var _dir2 = _interopRequireDefault(_dir); - -var _doDuring = require('./doDuring'); - -var _doDuring2 = _interopRequireDefault(_doDuring); - -var _doUntil = require('./doUntil'); - -var _doUntil2 = _interopRequireDefault(_doUntil); - -var _doWhilst = require('./doWhilst'); - -var _doWhilst2 = _interopRequireDefault(_doWhilst); - -var _during = require('./during'); - -var _during2 = _interopRequireDefault(_during); - -var _each = require('./each'); - -var _each2 = _interopRequireDefault(_each); - -var _eachLimit = require('./eachLimit'); - -var _eachLimit2 = _interopRequireDefault(_eachLimit); - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _eachSeries = require('./eachSeries'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _ensureAsync = require('./ensureAsync'); - -var _ensureAsync2 = _interopRequireDefault(_ensureAsync); - -var _every = require('./every'); - -var _every2 = _interopRequireDefault(_every); - -var _everyLimit = require('./everyLimit'); - -var _everyLimit2 = _interopRequireDefault(_everyLimit); - -var _everySeries = require('./everySeries'); - -var _everySeries2 = _interopRequireDefault(_everySeries); - -var _filter = require('./filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _filterSeries = require('./filterSeries'); - -var _filterSeries2 = _interopRequireDefault(_filterSeries); - -var _forever = require('./forever'); - -var _forever2 = _interopRequireDefault(_forever); - -var _groupBy = require('./groupBy'); - -var _groupBy2 = _interopRequireDefault(_groupBy); - -var _groupByLimit = require('./groupByLimit'); - -var _groupByLimit2 = _interopRequireDefault(_groupByLimit); - -var _groupBySeries = require('./groupBySeries'); - -var _groupBySeries2 = _interopRequireDefault(_groupBySeries); - -var _log = require('./log'); - -var _log2 = _interopRequireDefault(_log); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _mapSeries = require('./mapSeries'); - -var _mapSeries2 = _interopRequireDefault(_mapSeries); - -var _mapValues = require('./mapValues'); - -var _mapValues2 = _interopRequireDefault(_mapValues); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _mapValuesSeries = require('./mapValuesSeries'); - -var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries); - -var _memoize = require('./memoize'); - -var _memoize2 = _interopRequireDefault(_memoize); - -var _nextTick = require('./nextTick'); - -var _nextTick2 = _interopRequireDefault(_nextTick); - -var _parallel = require('./parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -var _parallelLimit = require('./parallelLimit'); - -var _parallelLimit2 = _interopRequireDefault(_parallelLimit); - -var _priorityQueue = require('./priorityQueue'); - -var _priorityQueue2 = _interopRequireDefault(_priorityQueue); - -var _queue = require('./queue'); - -var _queue2 = _interopRequireDefault(_queue); - -var _race = require('./race'); - -var _race2 = _interopRequireDefault(_race); - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _reduceRight = require('./reduceRight'); - -var _reduceRight2 = _interopRequireDefault(_reduceRight); - -var _reflect = require('./reflect'); - -var _reflect2 = _interopRequireDefault(_reflect); - -var _reflectAll = require('./reflectAll'); - -var _reflectAll2 = _interopRequireDefault(_reflectAll); - -var _reject = require('./reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _rejectLimit = require('./rejectLimit'); - -var _rejectLimit2 = _interopRequireDefault(_rejectLimit); - -var _rejectSeries = require('./rejectSeries'); - -var _rejectSeries2 = _interopRequireDefault(_rejectSeries); - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _retryable = require('./retryable'); - -var _retryable2 = _interopRequireDefault(_retryable); - -var _seq = require('./seq'); - -var _seq2 = _interopRequireDefault(_seq); - -var _series = require('./series'); - -var _series2 = _interopRequireDefault(_series); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _some = require('./some'); - -var _some2 = _interopRequireDefault(_some); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _someSeries = require('./someSeries'); - -var _someSeries2 = _interopRequireDefault(_someSeries); - -var _sortBy = require('./sortBy'); - -var _sortBy2 = _interopRequireDefault(_sortBy); - -var _timeout = require('./timeout'); - -var _timeout2 = _interopRequireDefault(_timeout); - -var _times = require('./times'); - -var _times2 = _interopRequireDefault(_times); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _timesSeries = require('./timesSeries'); - -var _timesSeries2 = _interopRequireDefault(_timesSeries); - -var _transform = require('./transform'); - -var _transform2 = _interopRequireDefault(_transform); - -var _tryEach = require('./tryEach'); - -var _tryEach2 = _interopRequireDefault(_tryEach); - -var _unmemoize = require('./unmemoize'); - -var _unmemoize2 = _interopRequireDefault(_unmemoize); - -var _until = require('./until'); - -var _until2 = _interopRequireDefault(_until); - -var _waterfall = require('./waterfall'); - -var _waterfall2 = _interopRequireDefault(_waterfall); - -var _whilst = require('./whilst'); - -var _whilst2 = _interopRequireDefault(_whilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - apply: _apply2.default, - applyEach: _applyEach2.default, - applyEachSeries: _applyEachSeries2.default, - asyncify: _asyncify2.default, - auto: _auto2.default, - autoInject: _autoInject2.default, - cargo: _cargo2.default, - compose: _compose2.default, - concat: _concat2.default, - concatLimit: _concatLimit2.default, - concatSeries: _concatSeries2.default, - constant: _constant2.default, - detect: _detect2.default, - detectLimit: _detectLimit2.default, - detectSeries: _detectSeries2.default, - dir: _dir2.default, - doDuring: _doDuring2.default, - doUntil: _doUntil2.default, - doWhilst: _doWhilst2.default, - during: _during2.default, - each: _each2.default, - eachLimit: _eachLimit2.default, - eachOf: _eachOf2.default, - eachOfLimit: _eachOfLimit2.default, - eachOfSeries: _eachOfSeries2.default, - eachSeries: _eachSeries2.default, - ensureAsync: _ensureAsync2.default, - every: _every2.default, - everyLimit: _everyLimit2.default, - everySeries: _everySeries2.default, - filter: _filter2.default, - filterLimit: _filterLimit2.default, - filterSeries: _filterSeries2.default, - forever: _forever2.default, - groupBy: _groupBy2.default, - groupByLimit: _groupByLimit2.default, - groupBySeries: _groupBySeries2.default, - log: _log2.default, - map: _map2.default, - mapLimit: _mapLimit2.default, - mapSeries: _mapSeries2.default, - mapValues: _mapValues2.default, - mapValuesLimit: _mapValuesLimit2.default, - mapValuesSeries: _mapValuesSeries2.default, - memoize: _memoize2.default, - nextTick: _nextTick2.default, - parallel: _parallel2.default, - parallelLimit: _parallelLimit2.default, - priorityQueue: _priorityQueue2.default, - queue: _queue2.default, - race: _race2.default, - reduce: _reduce2.default, - reduceRight: _reduceRight2.default, - reflect: _reflect2.default, - reflectAll: _reflectAll2.default, - reject: _reject2.default, - rejectLimit: _rejectLimit2.default, - rejectSeries: _rejectSeries2.default, - retry: _retry2.default, - retryable: _retryable2.default, - seq: _seq2.default, - series: _series2.default, - setImmediate: _setImmediate2.default, - some: _some2.default, - someLimit: _someLimit2.default, - someSeries: _someSeries2.default, - sortBy: _sortBy2.default, - timeout: _timeout2.default, - times: _times2.default, - timesLimit: _timesLimit2.default, - timesSeries: _timesSeries2.default, - transform: _transform2.default, - tryEach: _tryEach2.default, - unmemoize: _unmemoize2.default, - until: _until2.default, - waterfall: _waterfall2.default, - whilst: _whilst2.default, - - // aliases - all: _every2.default, - allLimit: _everyLimit2.default, - allSeries: _everySeries2.default, - any: _some2.default, - anyLimit: _someLimit2.default, - anySeries: _someSeries2.default, - find: _detect2.default, - findLimit: _detectLimit2.default, - findSeries: _detectSeries2.default, - forEach: _each2.default, - forEachSeries: _eachSeries2.default, - forEachLimit: _eachLimit2.default, - forEachOf: _eachOf2.default, - forEachOfSeries: _eachOfSeries2.default, - forEachOfLimit: _eachOfLimit2.default, - inject: _reduce2.default, - foldl: _reduce2.default, - foldr: _reduceRight2.default, - select: _filter2.default, - selectLimit: _filterLimit2.default, - selectSeries: _filterSeries2.default, - wrapSync: _asyncify2.default -}; /** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - -/** - * Async is a utility module which provides straight-forward, powerful functions - * for working with asynchronous JavaScript. Although originally designed for - * use with [Node.js](http://nodejs.org) and installable via - * `npm install --save async`, it can also be used directly in the browser. - * @module async - * @see AsyncFunction - */ - -/** - * A collection of `async` functions for manipulating collections, such as - * arrays and objects. - * @module Collections - */ - -/** - * A collection of `async` functions for controlling the flow through a script. - * @module ControlFlow - */ - -/** - * A collection of `async` utility functions. - * @module Utils - */ - -exports.apply = _apply2.default; -exports.applyEach = _applyEach2.default; -exports.applyEachSeries = _applyEachSeries2.default; -exports.asyncify = _asyncify2.default; -exports.auto = _auto2.default; -exports.autoInject = _autoInject2.default; -exports.cargo = _cargo2.default; -exports.compose = _compose2.default; -exports.concat = _concat2.default; -exports.concatLimit = _concatLimit2.default; -exports.concatSeries = _concatSeries2.default; -exports.constant = _constant2.default; -exports.detect = _detect2.default; -exports.detectLimit = _detectLimit2.default; -exports.detectSeries = _detectSeries2.default; -exports.dir = _dir2.default; -exports.doDuring = _doDuring2.default; -exports.doUntil = _doUntil2.default; -exports.doWhilst = _doWhilst2.default; -exports.during = _during2.default; -exports.each = _each2.default; -exports.eachLimit = _eachLimit2.default; -exports.eachOf = _eachOf2.default; -exports.eachOfLimit = _eachOfLimit2.default; -exports.eachOfSeries = _eachOfSeries2.default; -exports.eachSeries = _eachSeries2.default; -exports.ensureAsync = _ensureAsync2.default; -exports.every = _every2.default; -exports.everyLimit = _everyLimit2.default; -exports.everySeries = _everySeries2.default; -exports.filter = _filter2.default; -exports.filterLimit = _filterLimit2.default; -exports.filterSeries = _filterSeries2.default; -exports.forever = _forever2.default; -exports.groupBy = _groupBy2.default; -exports.groupByLimit = _groupByLimit2.default; -exports.groupBySeries = _groupBySeries2.default; -exports.log = _log2.default; -exports.map = _map2.default; -exports.mapLimit = _mapLimit2.default; -exports.mapSeries = _mapSeries2.default; -exports.mapValues = _mapValues2.default; -exports.mapValuesLimit = _mapValuesLimit2.default; -exports.mapValuesSeries = _mapValuesSeries2.default; -exports.memoize = _memoize2.default; -exports.nextTick = _nextTick2.default; -exports.parallel = _parallel2.default; -exports.parallelLimit = _parallelLimit2.default; -exports.priorityQueue = _priorityQueue2.default; -exports.queue = _queue2.default; -exports.race = _race2.default; -exports.reduce = _reduce2.default; -exports.reduceRight = _reduceRight2.default; -exports.reflect = _reflect2.default; -exports.reflectAll = _reflectAll2.default; -exports.reject = _reject2.default; -exports.rejectLimit = _rejectLimit2.default; -exports.rejectSeries = _rejectSeries2.default; -exports.retry = _retry2.default; -exports.retryable = _retryable2.default; -exports.seq = _seq2.default; -exports.series = _series2.default; -exports.setImmediate = _setImmediate2.default; -exports.some = _some2.default; -exports.someLimit = _someLimit2.default; -exports.someSeries = _someSeries2.default; -exports.sortBy = _sortBy2.default; -exports.timeout = _timeout2.default; -exports.times = _times2.default; -exports.timesLimit = _timesLimit2.default; -exports.timesSeries = _timesSeries2.default; -exports.transform = _transform2.default; -exports.tryEach = _tryEach2.default; -exports.unmemoize = _unmemoize2.default; -exports.until = _until2.default; -exports.waterfall = _waterfall2.default; -exports.whilst = _whilst2.default; -exports.all = _every2.default; -exports.allLimit = _everyLimit2.default; -exports.allSeries = _everySeries2.default; -exports.any = _some2.default; -exports.anyLimit = _someLimit2.default; -exports.anySeries = _someSeries2.default; -exports.find = _detect2.default; -exports.findLimit = _detectLimit2.default; -exports.findSeries = _detectSeries2.default; -exports.forEach = _each2.default; -exports.forEachSeries = _eachSeries2.default; -exports.forEachLimit = _eachLimit2.default; -exports.forEachOf = _eachOf2.default; -exports.forEachOfSeries = _eachOfSeries2.default; -exports.forEachOfLimit = _eachOfLimit2.default; -exports.inject = _reduce2.default; -exports.foldl = _reduce2.default; -exports.foldr = _reduceRight2.default; -exports.select = _filter2.default; -exports.selectLimit = _filterLimit2.default; -exports.selectSeries = _filterSeries2.default; -exports.wrapSync = _asyncify2.default; \ No newline at end of file diff --git a/node_modules/async/inject.js b/node_modules/async/inject.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/inject.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/DoublyLinkedList.js b/node_modules/async/internal/DoublyLinkedList.js deleted file mode 100644 index 7e71728..0000000 --- a/node_modules/async/internal/DoublyLinkedList.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = DLL; -// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation -// used for queues. This implementation assumes that the node provided by the user can be modified -// to adjust the next and last properties. We implement only the minimal functionality -// for queue support. -function DLL() { - this.head = this.tail = null; - this.length = 0; -} - -function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; -} - -DLL.prototype.removeLink = function (node) { - if (node.prev) node.prev.next = node.next;else this.head = node.next; - if (node.next) node.next.prev = node.prev;else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; -}; - -DLL.prototype.empty = function () { - while (this.head) this.shift(); - return this; -}; - -DLL.prototype.insertAfter = function (node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode;else this.tail = newNode; - node.next = newNode; - this.length += 1; -}; - -DLL.prototype.insertBefore = function (node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode;else this.head = newNode; - node.prev = newNode; - this.length += 1; -}; - -DLL.prototype.unshift = function (node) { - if (this.head) this.insertBefore(this.head, node);else setInitial(this, node); -}; - -DLL.prototype.push = function (node) { - if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node); -}; - -DLL.prototype.shift = function () { - return this.head && this.removeLink(this.head); -}; - -DLL.prototype.pop = function () { - return this.tail && this.removeLink(this.tail); -}; - -DLL.prototype.toArray = function () { - var arr = Array(this.length); - var curr = this.head; - for (var idx = 0; idx < this.length; idx++) { - arr[idx] = curr.data; - curr = curr.next; - } - return arr; -}; - -DLL.prototype.remove = function (testFn) { - var curr = this.head; - while (!!curr) { - var next = curr.next; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; -}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/applyEach.js b/node_modules/async/internal/applyEach.js deleted file mode 100644 index 322e03c..0000000 --- a/node_modules/async/internal/applyEach.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = applyEach; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _initialParams = require('./initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function applyEach(eachfn) { - return function (fns /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - var go = (0, _initialParams2.default)(function (args, callback) { - var that = this; - return eachfn(fns, function (fn, cb) { - (0, _wrapAsync2.default)(fn).apply(that, args.concat(cb)); - }, callback); - }); - if (args.length) { - return go.apply(this, args); - } else { - return go; - } - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/breakLoop.js b/node_modules/async/internal/breakLoop.js deleted file mode 100644 index 1065058..0000000 --- a/node_modules/async/internal/breakLoop.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -exports.default = {}; -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/consoleFunc.js b/node_modules/async/internal/consoleFunc.js deleted file mode 100644 index 603f48e..0000000 --- a/node_modules/async/internal/consoleFunc.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = consoleFunc; - -var _arrayEach = require('lodash/_arrayEach'); - -var _arrayEach2 = _interopRequireDefault(_arrayEach); - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function consoleFunc(name) { - return function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - args.push(function (err /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - if (typeof console === 'object') { - if (err) { - if (console.error) { - console.error(err); - } - } else if (console[name]) { - (0, _arrayEach2.default)(args, function (x) { - console[name](x); - }); - } - } - }); - (0, _wrapAsync2.default)(fn).apply(null, args); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/createTester.js b/node_modules/async/internal/createTester.js deleted file mode 100644 index ce96e8b..0000000 --- a/node_modules/async/internal/createTester.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _createTester; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _breakLoop = require('./breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _createTester(check, getResult) { - return function (eachfn, arr, iteratee, cb) { - cb = cb || _noop2.default; - var testPassed = false; - var testResult; - eachfn(arr, function (value, _, callback) { - iteratee(value, function (err, result) { - if (err) { - callback(err); - } else if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - callback(null, _breakLoop2.default); - } else { - callback(); - } - }); - }, function (err) { - if (err) { - cb(err); - } else { - cb(null, testPassed ? testResult : getResult(false)); - } - }); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/doLimit.js b/node_modules/async/internal/doLimit.js deleted file mode 100644 index 963c608..0000000 --- a/node_modules/async/internal/doLimit.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doLimit; -function doLimit(fn, limit) { - return function (iterable, iteratee, callback) { - return fn(iterable, limit, iteratee, callback); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/doParallel.js b/node_modules/async/internal/doParallel.js deleted file mode 100644 index bb40207..0000000 --- a/node_modules/async/internal/doParallel.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doParallel; - -var _eachOf = require('../eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function doParallel(fn) { - return function (obj, iteratee, callback) { - return fn(_eachOf2.default, obj, (0, _wrapAsync2.default)(iteratee), callback); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/doParallelLimit.js b/node_modules/async/internal/doParallelLimit.js deleted file mode 100644 index a7e963d..0000000 --- a/node_modules/async/internal/doParallelLimit.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = doParallelLimit; - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function doParallelLimit(fn) { - return function (obj, limit, iteratee, callback) { - return fn((0, _eachOfLimit2.default)(limit), obj, (0, _wrapAsync2.default)(iteratee), callback); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/eachOfLimit.js b/node_modules/async/internal/eachOfLimit.js deleted file mode 100644 index 6f6fe55..0000000 --- a/node_modules/async/internal/eachOfLimit.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _eachOfLimit; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./once'); - -var _once2 = _interopRequireDefault(_once); - -var _iterator = require('./iterator'); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _onlyOnce = require('./onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _breakLoop = require('./breakLoop'); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _eachOfLimit(limit) { - return function (obj, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (limit <= 0 || !obj) { - return callback(null); - } - var nextElem = (0, _iterator2.default)(obj); - var done = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - running -= 1; - if (err) { - done = true; - callback(err); - } else if (value === _breakLoop2.default || done && running <= 0) { - done = true; - return callback(null); - } else if (!looping) { - replenish(); - } - } - - function replenish() { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/filter.js b/node_modules/async/internal/filter.js deleted file mode 100644 index 74f3986..0000000 --- a/node_modules/async/internal/filter.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _filter; - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _baseProperty = require('lodash/_baseProperty'); - -var _baseProperty2 = _interopRequireDefault(_baseProperty); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, function (x, index, callback) { - iteratee(x, function (err, v) { - truthValues[index] = !!v; - callback(err); - }); - }, function (err) { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); -} - -function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, function (x, index, callback) { - iteratee(x, function (err, v) { - if (err) { - callback(err); - } else { - if (v) { - results.push({ index: index, value: x }); - } - callback(); - } - }); - }, function (err) { - if (err) { - callback(err); - } else { - callback(null, (0, _arrayMap2.default)(results.sort(function (a, b) { - return a.index - b.index; - }), (0, _baseProperty2.default)('value'))); - } - }); -} - -function _filter(eachfn, coll, iteratee, callback) { - var filter = (0, _isArrayLike2.default)(coll) ? filterArray : filterGeneric; - filter(eachfn, coll, (0, _wrapAsync2.default)(iteratee), callback || _noop2.default); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/findGetResult.js b/node_modules/async/internal/findGetResult.js deleted file mode 100644 index f8d3fe0..0000000 --- a/node_modules/async/internal/findGetResult.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _findGetResult; -function _findGetResult(v, x) { - return x; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/getIterator.js b/node_modules/async/internal/getIterator.js deleted file mode 100644 index 3eadd24..0000000 --- a/node_modules/async/internal/getIterator.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (coll) { - return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); -}; - -var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/initialParams.js b/node_modules/async/internal/initialParams.js deleted file mode 100644 index df02cb1..0000000 --- a/node_modules/async/internal/initialParams.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (fn) { - return function () /*...args, callback*/{ - var args = (0, _slice2.default)(arguments); - var callback = args.pop(); - fn.call(this, args, callback); - }; -}; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/iterator.js b/node_modules/async/internal/iterator.js deleted file mode 100644 index 886beb5..0000000 --- a/node_modules/async/internal/iterator.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = iterator; - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _getIterator = require('./getIterator'); - -var _getIterator2 = _interopRequireDefault(_getIterator); - -var _keys = require('lodash/keys'); - -var _keys2 = _interopRequireDefault(_keys); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? { value: coll[i], key: i } : null; - }; -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) return null; - i++; - return { value: item.value, key: i }; - }; -} - -function createObjectIterator(obj) { - var okeys = (0, _keys2.default)(obj); - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? { value: obj[key], key: key } : null; - }; -} - -function iterator(coll) { - if ((0, _isArrayLike2.default)(coll)) { - return createArrayIterator(coll); - } - - var iterator = (0, _getIterator2.default)(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/map.js b/node_modules/async/internal/map.js deleted file mode 100644 index f4f2aa5..0000000 --- a/node_modules/async/internal/map.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _asyncMap; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncMap(eachfn, arr, iteratee, callback) { - callback = callback || _noop2.default; - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - eachfn(arr, function (value, _, callback) { - var index = counter++; - _iteratee(value, function (err, v) { - results[index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/notId.js b/node_modules/async/internal/notId.js deleted file mode 100644 index 0106c92..0000000 --- a/node_modules/async/internal/notId.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = notId; -function notId(v) { - return !v; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/once.js b/node_modules/async/internal/once.js deleted file mode 100644 index f0c379f..0000000 --- a/node_modules/async/internal/once.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = once; -function once(fn) { - return function () { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/onlyOnce.js b/node_modules/async/internal/onlyOnce.js deleted file mode 100644 index f2e3001..0000000 --- a/node_modules/async/internal/onlyOnce.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = onlyOnce; -function onlyOnce(fn) { - return function () { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/parallel.js b/node_modules/async/internal/parallel.js deleted file mode 100644 index c97293b..0000000 --- a/node_modules/async/internal/parallel.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _parallel; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _isArrayLike = require('lodash/isArrayLike'); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _parallel(eachfn, tasks, callback) { - callback = callback || _noop2.default; - var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; - - eachfn(tasks, function (task, key, callback) { - (0, _wrapAsync2.default)(task)(function (err, result) { - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } - results[key] = result; - callback(err); - }); - }, function (err) { - callback(err, results); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/queue.js b/node_modules/async/internal/queue.js deleted file mode 100644 index 19534a7..0000000 --- a/node_modules/async/internal/queue.js +++ /dev/null @@ -1,204 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = queue; - -var _baseIndexOf = require('lodash/_baseIndexOf'); - -var _baseIndexOf2 = _interopRequireDefault(_baseIndexOf); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _onlyOnce = require('./onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _DoublyLinkedList = require('./DoublyLinkedList'); - -var _DoublyLinkedList2 = _interopRequireDefault(_DoublyLinkedList); - -var _wrapAsync = require('./wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function queue(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } else if (concurrency === 0) { - throw new Error('Concurrency must not be zero'); - } - - var _worker = (0, _wrapAsync2.default)(worker); - var numRunning = 0; - var workersList = []; - - var processingScheduled = false; - function _insert(data, insertAtFront, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!(0, _isArray2.default)(data)) { - data = [data]; - } - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - return (0, _setImmediate2.default)(function () { - q.drain(); - }); - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - callback: callback || _noop2.default - }; - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - } - - if (!processingScheduled) { - processingScheduled = true; - (0, _setImmediate2.default)(function () { - processingScheduled = false; - q.process(); - }); - } - } - - function _next(tasks) { - return function (err) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = (0, _baseIndexOf2.default)(workersList, task, 0); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback.apply(task, arguments); - - if (err != null) { - q.error(err, task.data); - } - } - - if (numRunning <= q.concurrency - q.buffer) { - q.unsaturated(); - } - - if (q.idle()) { - q.drain(); - } - q.process(); - }; - } - - var isProcessing = false; - var q = { - _tasks: new _DoublyLinkedList2.default(), - concurrency: concurrency, - payload: payload, - saturated: _noop2.default, - unsaturated: _noop2.default, - buffer: concurrency / 4, - empty: _noop2.default, - drain: _noop2.default, - error: _noop2.default, - started: false, - paused: false, - push: function (data, callback) { - _insert(data, false, callback); - }, - kill: function () { - q.drain = _noop2.default; - q._tasks.empty(); - }, - unshift: function (data, callback) { - _insert(data, true, callback); - }, - remove: function (testFn) { - q._tasks.remove(testFn); - }, - process: function () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while (!q.paused && numRunning < q.concurrency && q._tasks.length) { - var tasks = [], - data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - q.empty(); - } - - if (numRunning === q.concurrency) { - q.saturated(); - } - - var cb = (0, _onlyOnce2.default)(_next(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length: function () { - return q._tasks.length; - }, - running: function () { - return numRunning; - }, - workersList: function () { - return workersList; - }, - idle: function () { - return q._tasks.length + numRunning === 0; - }, - pause: function () { - q.paused = true; - }, - resume: function () { - if (q.paused === false) { - return; - } - q.paused = false; - (0, _setImmediate2.default)(q.process); - } - }; - return q; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/reject.js b/node_modules/async/internal/reject.js deleted file mode 100644 index 5dbfcfb..0000000 --- a/node_modules/async/internal/reject.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reject; - -var _filter = require('./filter'); - -var _filter2 = _interopRequireDefault(_filter); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function reject(eachfn, arr, iteratee, callback) { - (0, _filter2.default)(eachfn, arr, function (value, cb) { - iteratee(value, function (err, v) { - cb(err, !v); - }); - }, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/internal/setImmediate.js b/node_modules/async/internal/setImmediate.js deleted file mode 100644 index 3545f2b..0000000 --- a/node_modules/async/internal/setImmediate.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasNextTick = exports.hasSetImmediate = undefined; -exports.fallback = fallback; -exports.wrap = wrap; - -var _slice = require('./slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return function (fn /*, ...args*/) { - var args = (0, _slice2.default)(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; -} - -var _defer; - -if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -exports.default = wrap(_defer); \ No newline at end of file diff --git a/node_modules/async/internal/slice.js b/node_modules/async/internal/slice.js deleted file mode 100644 index 56f10c0..0000000 --- a/node_modules/async/internal/slice.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = slice; -function slice(arrayLike, start) { - start = start | 0; - var newLen = Math.max(arrayLike.length - start, 0); - var newArr = Array(newLen); - for (var idx = 0; idx < newLen; idx++) { - newArr[idx] = arrayLike[start + idx]; - } - return newArr; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/withoutIndex.js b/node_modules/async/internal/withoutIndex.js deleted file mode 100644 index 2bd3579..0000000 --- a/node_modules/async/internal/withoutIndex.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _withoutIndex; -function _withoutIndex(iteratee) { - return function (value, index, callback) { - return iteratee(value, callback); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/internal/wrapAsync.js b/node_modules/async/internal/wrapAsync.js deleted file mode 100644 index bc6c966..0000000 --- a/node_modules/async/internal/wrapAsync.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isAsync = undefined; - -var _asyncify = require('../asyncify'); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var supportsSymbol = typeof Symbol === 'function'; - -function isAsync(fn) { - return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function wrapAsync(asyncFn) { - return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; -} - -exports.default = wrapAsync; -exports.isAsync = isAsync; \ No newline at end of file diff --git a/node_modules/async/log.js b/node_modules/async/log.js deleted file mode 100644 index c643867..0000000 --- a/node_modules/async/log.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _consoleFunc = require('./internal/consoleFunc'); - -var _consoleFunc2 = _interopRequireDefault(_consoleFunc); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ -exports.default = (0, _consoleFunc2.default)('log'); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/map.js b/node_modules/async/map.js deleted file mode 100644 index 67c9cda..0000000 --- a/node_modules/async/map.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _map = require('./internal/map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callback - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @example - * - * async.map(['file1','file2','file3'], fs.stat, function(err, results) { - * // results is now an array of stats for each file - * }); - */ -exports.default = (0, _doParallel2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapLimit.js b/node_modules/async/mapLimit.js deleted file mode 100644 index c8b60d8..0000000 --- a/node_modules/async/mapLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _map = require('./internal/map'); - -var _map2 = _interopRequireDefault(_map); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_map2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapSeries.js b/node_modules/async/mapSeries.js deleted file mode 100644 index 61b42d0..0000000 --- a/node_modules/async/mapSeries.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - */ -exports.default = (0, _doLimit2.default)(_mapLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValues.js b/node_modules/async/mapValues.js deleted file mode 100644 index 3d838ca..0000000 --- a/node_modules/async/mapValues.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @example - * - * async.mapValues({ - * f1: 'file1', - * f2: 'file2', - * f3: 'file3' - * }, function (file, key, callback) { - * fs.stat(file, callback); - * }, function(err, result) { - * // result is now a map of stats for each file, e.g. - * // { - * // f1: [stats for file1], - * // f2: [stats for file2], - * // f3: [stats for file3] - * // } - * }); - */ - -exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValuesLimit.js b/node_modules/async/mapValuesLimit.js deleted file mode 100644 index 912a8b5..0000000 --- a/node_modules/async/mapValuesLimit.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mapValuesLimit; - -var _eachOfLimit = require('./eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -function mapValuesLimit(obj, limit, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var newObj = {}; - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfLimit2.default)(obj, limit, function (val, key, next) { - _iteratee(val, key, function (err, result) { - if (err) return next(err); - newObj[key] = result; - next(); - }); - }, function (err) { - callback(err, newObj); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/mapValuesSeries.js b/node_modules/async/mapValuesSeries.js deleted file mode 100644 index b378c4a..0000000 --- a/node_modules/async/mapValuesSeries.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _mapValuesLimit = require('./mapValuesLimit'); - -var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_mapValuesLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/memoize.js b/node_modules/async/memoize.js deleted file mode 100644 index 1f2b566..0000000 --- a/node_modules/async/memoize.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = memoize; - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function has(obj, key) { - return key in obj; -} - -/** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ -function memoize(fn, hasher) { - var memo = Object.create(null); - var queues = Object.create(null); - hasher = hasher || _identity2.default; - var _fn = (0, _wrapAsync2.default)(fn); - var memoized = (0, _initialParams2.default)(function memoized(args, callback) { - var key = hasher.apply(null, args); - if (has(memo, key)) { - (0, _setImmediate2.default)(function () { - callback.apply(null, memo[key]); - }); - } else if (has(queues, key)) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn.apply(null, args.concat(function () /*args*/{ - var args = (0, _slice2.default)(arguments); - memo[key] = args; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, args); - } - })); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/nextTick.js b/node_modules/async/nextTick.js deleted file mode 100644 index 886f58e..0000000 --- a/node_modules/async/nextTick.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate'); - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -var _defer; - -if (_setImmediate.hasNextTick) { - _defer = process.nextTick; -} else if (_setImmediate.hasSetImmediate) { - _defer = setImmediate; -} else { - _defer = _setImmediate.fallback; -} - -exports.default = (0, _setImmediate.wrap)(_defer); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/package.json b/node_modules/async/package.json deleted file mode 100644 index 76b3db7..0000000 --- a/node_modules/async/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "2.6.4", - "main": "dist/async.js", - "author": "Caolan McMahon", - "homepage": "https://caolan.github.io/async/", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "keywords": [ - "async", - "callback", - "module", - "utility" - ], - "dependencies": { - "lodash": "^4.17.14" - }, - "devDependencies": { - "babel-cli": "^6.24.0", - "babel-core": "^6.26.3", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-plugin-istanbul": "^2.0.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "babel-preset-es2015": "^6.3.13", - "babel-preset-es2017": "^6.22.0", - "babelify": "^8.0.0", - "benchmark": "^2.1.1", - "bluebird": "^3.4.6", - "browserify": "^16.2.2", - "chai": "^4.1.2", - "cheerio": "^0.22.0", - "coveralls": "^3.0.1", - "es6-promise": "^2.3.0", - "eslint": "^2.13.1", - "fs-extra": "^0.26.7", - "gh-pages-deploy": "^0.5.0", - "jsdoc": "^3.4.0", - "karma": "^2.0.2", - "karma-browserify": "^5.2.0", - "karma-firefox-launcher": "^1.1.0", - "karma-mocha": "^1.2.0", - "karma-mocha-reporter": "^2.2.0", - "mocha": "^5.2.0", - "native-promise-only": "^0.8.0-a", - "nyc": "^11.8.0", - "rimraf": "^2.5.0", - "rollup": "^0.36.3", - "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-npm": "^2.0.0", - "rsvp": "^3.0.18", - "semver": "^5.5.0", - "uglify-js": "~2.7.3", - "yargs": "^11.0.0" - }, - "scripts": { - "coverage": "nyc npm run mocha-node-test -- --grep @nycinvalid --invert", - "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls", - "jsdoc": "jsdoc -c ./support/jsdoc/jsdoc.json && node support/jsdoc/jsdoc-fix-html.js", - "lint": "eslint lib/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/build/ support/*.js karma.conf.js", - "mocha-browser-test": "karma start", - "mocha-node-test": "mocha mocha_test/ --compilers js:babel-core/register", - "mocha-test": "npm run mocha-node-test && npm run mocha-browser-test", - "test": "npm run lint && npm run mocha-node-test" - }, - "license": "MIT", - "gh-pages-deploy": { - "staticpath": "docs" - }, - "nyc": { - "exclude": [ - "mocha_test" - ] - } -} \ No newline at end of file diff --git a/node_modules/async/parallel.js b/node_modules/async/parallel.js deleted file mode 100644 index da28a4d..0000000 --- a/node_modules/async/parallel.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallelLimit; - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * - * @example - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // optional callback - * function(err, results) { - * // the results array will equal ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equals to: {one: 1, two: 2} - * }); - */ -function parallelLimit(tasks, callback) { - (0, _parallel2.default)(_eachOf2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/parallelLimit.js b/node_modules/async/parallelLimit.js deleted file mode 100644 index a026526..0000000 --- a/node_modules/async/parallelLimit.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parallelLimit; - -var _eachOfLimit = require('./internal/eachOfLimit'); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - */ -function parallelLimit(tasks, limit, callback) { - (0, _parallel2.default)((0, _eachOfLimit2.default)(limit), tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/priorityQueue.js b/node_modules/async/priorityQueue.js deleted file mode 100644 index 3a5f023..0000000 --- a/node_modules/async/priorityQueue.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - // Start with a normal queue - var q = (0, _queue2.default)(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - if (callback == null) callback = _noop2.default; - if (typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - if (!(0, _isArray2.default)(data)) { - data = [data]; - } - if (data.length === 0) { - // call drain immediately if there are no tasks - return (0, _setImmediate2.default)(function () { - q.drain(); - }); - } - - priority = priority || 0; - var nextNode = q._tasks.head; - while (nextNode && priority >= nextNode.priority) { - nextNode = nextNode.next; - } - - for (var i = 0, l = data.length; i < l; i++) { - var item = { - data: data[i], - priority: priority, - callback: callback - }; - - if (nextNode) { - q._tasks.insertBefore(nextNode, item); - } else { - q._tasks.push(item); - } - } - (0, _setImmediate2.default)(q.process); - }; - - // Remove unshift function - delete q.unshift; - - return q; -}; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _setImmediate = require('./setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _queue = require('./queue'); - -var _queue2 = _interopRequireDefault(_queue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * The `unshift` method was removed. - */ \ No newline at end of file diff --git a/node_modules/async/queue.js b/node_modules/async/queue.js deleted file mode 100644 index 0ca8ba2..0000000 --- a/node_modules/async/queue.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (worker, concurrency) { - var _worker = (0, _wrapAsync2.default)(worker); - return (0, _queue2.default)(function (items, cb) { - _worker(items[0], cb); - }, concurrency, 1); -}; - -var _queue = require('./internal/queue'); - -var _queue2 = _interopRequireDefault(_queue); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A queue of tasks for the worker function to complete. - * @typedef {Object} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {Function} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {Function} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a callback that is called when the number of - * running workers hits the `concurrency` limit, and further tasks will be - * queued. - * @property {Function} unsaturated - a callback that is called when the number - * of running workers is less than the `concurrency` & `buffer` limits, and - * further tasks will not be queued. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a callback that is called when the last item - * from the `queue` is given to a `worker`. - * @property {Function} drain - a callback that is called when the last item - * from the `queue` has returned from the `worker`. - * @property {Function} error - a callback that is called when a task errors. - * Has the signature `function(error, task)`. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - */ - -/** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain = function() { - * console.log('all items have been processed'); - * }; - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * q.push({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ \ No newline at end of file diff --git a/node_modules/async/race.js b/node_modules/async/race.js deleted file mode 100644 index 6713c74..0000000 --- a/node_modules/async/race.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = race; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns undefined - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ -function race(tasks, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (!(0, _isArray2.default)(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - (0, _wrapAsync2.default)(tasks[i])(callback); - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reduce.js b/node_modules/async/reduce.js deleted file mode 100644 index 3fb8019..0000000 --- a/node_modules/async/reduce.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduce; - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Reduces `coll` into a single value using an async `iteratee` to return each - * successive step. `memo` is the initial state of the reduction. This function - * only operates in series. - * - * For performance reasons, it may make sense to split a call to this function - * into a parallel map, and then use the normal `Array.prototype.reduce` on the - * results. This function is for situations where each step in the reduction - * needs to be async; if you can get the data before reducing it, then it's - * probably a good idea to do so. - * - * @name reduce - * @static - * @memberOf module:Collections - * @method - * @alias inject - * @alias foldl - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @example - * - * async.reduce([1,2,3], 0, function(memo, item, callback) { - * // pointless async: - * process.nextTick(function() { - * callback(null, memo + item) - * }); - * }, function(err, result) { - * // result is now equal to the last value of memo, which is 6 - * }); - */ -function reduce(coll, memo, iteratee, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _eachOfSeries2.default)(coll, function (x, i, callback) { - _iteratee(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reduceRight.js b/node_modules/async/reduceRight.js deleted file mode 100644 index 3d17d32..0000000 --- a/node_modules/async/reduceRight.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reduceRight; - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee complete with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - */ -function reduceRight(array, memo, iteratee, callback) { - var reversed = (0, _slice2.default)(array).reverse(); - (0, _reduce2.default)(reversed, memo, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reflect.js b/node_modules/async/reflect.js deleted file mode 100644 index 098ba86..0000000 --- a/node_modules/async/reflect.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflect; - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ -function reflect(fn) { - var _fn = (0, _wrapAsync2.default)(fn); - return (0, _initialParams2.default)(function reflectOn(args, reflectCallback) { - args.push(function callback(error, cbArg) { - if (error) { - reflectCallback(null, { error: error }); - } else { - var value; - if (arguments.length <= 2) { - value = cbArg; - } else { - value = (0, _slice2.default)(arguments, 1); - } - reflectCallback(null, { value: value }); - } - }); - - return _fn.apply(this, args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reflectAll.js b/node_modules/async/reflectAll.js deleted file mode 100644 index 966e83d..0000000 --- a/node_modules/async/reflectAll.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = reflectAll; - -var _reflect = require('./reflect'); - -var _reflect2 = _interopRequireDefault(_reflect); - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _arrayMap2 = require('lodash/_arrayMap'); - -var _arrayMap3 = _interopRequireDefault(_arrayMap2); - -var _baseForOwn = require('lodash/_baseForOwn'); - -var _baseForOwn2 = _interopRequireDefault(_baseForOwn); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ -function reflectAll(tasks) { - var results; - if ((0, _isArray2.default)(tasks)) { - results = (0, _arrayMap3.default)(tasks, _reflect2.default); - } else { - results = {}; - (0, _baseForOwn2.default)(tasks, function (task, key) { - results[key] = _reflect2.default.call(this, task); - }); - } - return results; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/reject.js b/node_modules/async/reject.js deleted file mode 100644 index 53802b5..0000000 --- a/node_modules/async/reject.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject = require('./internal/reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.reject(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of missing files - * createFiles(results); - * }); - */ -exports.default = (0, _doParallel2.default)(_reject2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/rejectLimit.js b/node_modules/async/rejectLimit.js deleted file mode 100644 index 74bba7f..0000000 --- a/node_modules/async/rejectLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _reject = require('./internal/reject'); - -var _reject2 = _interopRequireDefault(_reject); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_reject2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/rejectSeries.js b/node_modules/async/rejectSeries.js deleted file mode 100644 index f905588..0000000 --- a/node_modules/async/rejectSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _rejectLimit = require('./rejectLimit'); - -var _rejectLimit2 = _interopRequireDefault(_rejectLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doLimit2.default)(_rejectLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/retry.js b/node_modules/async/retry.js deleted file mode 100644 index 6a1aa1e..0000000 --- a/node_modules/async/retry.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = retry; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _constant = require('lodash/constant'); - -var _constant2 = _interopRequireDefault(_constant); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ -function retry(opts, task, callback) { - var DEFAULT_TIMES = 5; - var DEFAULT_INTERVAL = 0; - - var options = { - times: DEFAULT_TIMES, - intervalFunc: (0, _constant2.default)(DEFAULT_INTERVAL) - }; - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? t.interval : (0, _constant2.default)(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || _noop2.default; - task = opts; - } else { - parseTimes(options, opts); - callback = callback || _noop2.default; - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = (0, _wrapAsync2.default)(task); - - var attempt = 1; - function retryAttempt() { - _task(function (err) { - if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt)); - } else { - callback.apply(null, arguments); - } - }); - } - - retryAttempt(); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/retryable.js b/node_modules/async/retryable.js deleted file mode 100644 index 002bfb0..0000000 --- a/node_modules/async/retryable.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (opts, task) { - if (!task) { - task = opts; - opts = null; - } - var _task = (0, _wrapAsync2.default)(task); - return (0, _initialParams2.default)(function (args, callback) { - function taskFn(cb) { - _task.apply(null, args.concat(cb)); - } - - if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback); - }); -}; - -var _retry = require('./retry'); - -var _retry2 = _interopRequireDefault(_retry); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ \ No newline at end of file diff --git a/node_modules/async/select.js b/node_modules/async/select.js deleted file mode 100644 index 54772d5..0000000 --- a/node_modules/async/select.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @example - * - * async.filter(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, results) { - * // results now equals an array of the existing files - * }); - */ -exports.default = (0, _doParallel2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/selectLimit.js b/node_modules/async/selectLimit.js deleted file mode 100644 index 06216f7..0000000 --- a/node_modules/async/selectLimit.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filter = require('./internal/filter'); - -var _filter2 = _interopRequireDefault(_filter); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - */ -exports.default = (0, _doParallelLimit2.default)(_filter2.default); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/selectSeries.js b/node_modules/async/selectSeries.js deleted file mode 100644 index e48d966..0000000 --- a/node_modules/async/selectSeries.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _filterLimit = require('./filterLimit'); - -var _filterLimit2 = _interopRequireDefault(_filterLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - */ -exports.default = (0, _doLimit2.default)(_filterLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/seq.js b/node_modules/async/seq.js deleted file mode 100644 index ff86ef9..0000000 --- a/node_modules/async/seq.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = seq; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _reduce = require('./reduce'); - -var _reduce2 = _interopRequireDefault(_reduce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ -function seq() /*...functions*/{ - var _functions = (0, _arrayMap2.default)(arguments, _wrapAsync2.default); - return function () /*...args*/{ - var args = (0, _slice2.default)(arguments); - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = _noop2.default; - } - - (0, _reduce2.default)(_functions, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat(function (err /*, ...nextargs*/) { - var nextargs = (0, _slice2.default)(arguments, 1); - cb(err, nextargs); - })); - }, function (err, results) { - cb.apply(that, [err].concat(results)); - }); - }; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/series.js b/node_modules/async/series.js deleted file mode 100644 index e8c2928..0000000 --- a/node_modules/async/series.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = series; - -var _parallel = require('./internal/parallel'); - -var _parallel2 = _interopRequireDefault(_parallel); - -var _eachOfSeries = require('./eachOfSeries'); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @example - * async.series([ - * function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }, - * function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * } - * ], - * // optional callback - * function(err, results) { - * // results is now equal to ['one', 'two'] - * }); - * - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback){ - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * // results is now equal to: {one: 1, two: 2} - * }); - */ -function series(tasks, callback) { - (0, _parallel2.default)(_eachOfSeries2.default, tasks, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/setImmediate.js b/node_modules/async/setImmediate.js deleted file mode 100644 index e52f7c5..0000000 --- a/node_modules/async/setImmediate.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `setImmediate`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name setImmediate - * @static - * @memberOf module:Utils - * @method - * @see [async.nextTick]{@link module:Utils.nextTick} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ -exports.default = _setImmediate2.default; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/some.js b/node_modules/async/some.js deleted file mode 100644 index a8e70f7..0000000 --- a/node_modules/async/some.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallel = require('./internal/doParallel'); - -var _doParallel2 = _interopRequireDefault(_doParallel); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @example - * - * async.some(['file1','file2','file3'], function(filePath, callback) { - * fs.access(filePath, function(err) { - * callback(null, !err) - * }); - * }, function(err, result) { - * // if result is true then at least one of the files exists - * }); - */ -exports.default = (0, _doParallel2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/someLimit.js b/node_modules/async/someLimit.js deleted file mode 100644 index 24ca3f4..0000000 --- a/node_modules/async/someLimit.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createTester = require('./internal/createTester'); - -var _createTester2 = _interopRequireDefault(_createTester); - -var _doParallelLimit = require('./internal/doParallelLimit'); - -var _doParallelLimit2 = _interopRequireDefault(_doParallelLimit); - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doParallelLimit2.default)((0, _createTester2.default)(Boolean, _identity2.default)); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/someSeries.js b/node_modules/async/someSeries.js deleted file mode 100644 index dc24ed2..0000000 --- a/node_modules/async/someSeries.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _someLimit = require('./someLimit'); - -var _someLimit2 = _interopRequireDefault(_someLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - */ -exports.default = (0, _doLimit2.default)(_someLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/sortBy.js b/node_modules/async/sortBy.js deleted file mode 100644 index ee5e93d..0000000 --- a/node_modules/async/sortBy.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sortBy; - -var _arrayMap = require('lodash/_arrayMap'); - -var _arrayMap2 = _interopRequireDefault(_arrayMap); - -var _baseProperty = require('lodash/_baseProperty'); - -var _baseProperty2 = _interopRequireDefault(_baseProperty); - -var _map = require('./map'); - -var _map2 = _interopRequireDefault(_map); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @example - * - * async.sortBy(['file1','file2','file3'], function(file, callback) { - * fs.stat(file, function(err, stats) { - * callback(err, stats.mtime); - * }); - * }, function(err, results) { - * // results is now the original array of files sorted by - * // modified date - * }); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x); - * }, function(err,result) { - * // result callback - * }); - * - * // descending order - * async.sortBy([1,9,3,5], function(x, callback) { - * callback(null, x*-1); //<- x*-1 instead of x, turns the order around - * }, function(err,result) { - * // result callback - * }); - */ -function sortBy(coll, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _map2.default)(coll, function (x, callback) { - _iteratee(x, function (err, criteria) { - if (err) return callback(err); - callback(null, { value: x, criteria: criteria }); - }); - }, function (err, results) { - if (err) return callback(err); - callback(null, (0, _arrayMap2.default)(results.sort(comparator), (0, _baseProperty2.default)('value'))); - }); - - function comparator(left, right) { - var a = left.criteria, - b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timeout.js b/node_modules/async/timeout.js deleted file mode 100644 index b5cb505..0000000 --- a/node_modules/async/timeout.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timeout; - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ -function timeout(asyncFn, milliseconds, info) { - var fn = (0, _wrapAsync2.default)(asyncFn); - - return (0, _initialParams2.default)(function (args, callback) { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push(function () { - if (!timedOut) { - callback.apply(null, arguments); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn.apply(null, args); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/times.js b/node_modules/async/times.js deleted file mode 100644 index b5ca24d..0000000 --- a/node_modules/async/times.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ -exports.default = (0, _doLimit2.default)(_timesLimit2.default, Infinity); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timesLimit.js b/node_modules/async/timesLimit.js deleted file mode 100644 index aad8495..0000000 --- a/node_modules/async/timesLimit.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = timeLimit; - -var _mapLimit = require('./mapLimit'); - -var _mapLimit2 = _interopRequireDefault(_mapLimit); - -var _baseRange = require('lodash/_baseRange'); - -var _baseRange2 = _interopRequireDefault(_baseRange); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - */ -function timeLimit(count, limit, iteratee, callback) { - var _iteratee = (0, _wrapAsync2.default)(iteratee); - (0, _mapLimit2.default)((0, _baseRange2.default)(0, count, 1), limit, _iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/timesSeries.js b/node_modules/async/timesSeries.js deleted file mode 100644 index f187a35..0000000 --- a/node_modules/async/timesSeries.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _timesLimit = require('./timesLimit'); - -var _timesLimit2 = _interopRequireDefault(_timesLimit); - -var _doLimit = require('./internal/doLimit'); - -var _doLimit2 = _interopRequireDefault(_doLimit); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - */ -exports.default = (0, _doLimit2.default)(_timesLimit2.default, 1); -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/transform.js b/node_modules/async/transform.js deleted file mode 100644 index 84ee217..0000000 --- a/node_modules/async/transform.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transform; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _eachOf = require('./eachOf'); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in series, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @example - * - * async.transform([1,2,3], function(acc, item, index, callback) { - * // pointless async: - * process.nextTick(function() { - * acc.push(item * 2) - * callback(null) - * }); - * }, function(err, result) { - * // result is now equal to [2, 4, 6] - * }); - * - * @example - * - * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { - * setImmediate(function () { - * obj[key] = val * 2; - * callback(); - * }) - * }, function (err, result) { - * // result is equal to {a: 2, b: 4, c: 6} - * }) - */ -function transform(coll, accumulator, iteratee, callback) { - if (arguments.length <= 3) { - callback = iteratee; - iteratee = accumulator; - accumulator = (0, _isArray2.default)(coll) ? [] : {}; - } - callback = (0, _once2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - - (0, _eachOf2.default)(coll, function (v, k, cb) { - _iteratee(accumulator, v, k, cb); - }, function (err) { - callback(err, accumulator); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/tryEach.js b/node_modules/async/tryEach.js deleted file mode 100644 index f4e4c97..0000000 --- a/node_modules/async/tryEach.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = tryEach; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _eachSeries = require('./eachSeries'); - -var _eachSeries2 = _interopRequireDefault(_eachSeries); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ -function tryEach(tasks, callback) { - var error = null; - var result; - callback = callback || _noop2.default; - (0, _eachSeries2.default)(tasks, function (task, callback) { - (0, _wrapAsync2.default)(task)(function (err, res /*, ...args*/) { - if (arguments.length > 2) { - result = (0, _slice2.default)(arguments, 1); - } else { - result = res; - } - error = err; - callback(!err); - }); - }, function () { - callback(error, result); - }); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/unmemoize.js b/node_modules/async/unmemoize.js deleted file mode 100644 index 08f9f9f..0000000 --- a/node_modules/async/unmemoize.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = unmemoize; -/** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ -function unmemoize(fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; -} -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/async/until.js b/node_modules/async/until.js deleted file mode 100644 index 29955ab..0000000 --- a/node_modules/async/until.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = until; - -var _whilst = require('./whilst'); - -var _whilst2 = _interopRequireDefault(_whilst); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - */ -function until(test, iteratee, callback) { - (0, _whilst2.default)(function () { - return !test.apply(this, arguments); - }, iteratee, callback); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/waterfall.js b/node_modules/async/waterfall.js deleted file mode 100644 index d547d6b..0000000 --- a/node_modules/async/waterfall.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (tasks, callback) { - callback = (0, _once2.default)(callback || _noop2.default); - if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = (0, _wrapAsync2.default)(tasks[taskIndex++]); - args.push((0, _onlyOnce2.default)(next)); - task.apply(null, args); - } - - function next(err /*, ...args*/) { - if (err || taskIndex === tasks.length) { - return callback.apply(null, arguments); - } - nextTask((0, _slice2.default)(arguments, 1)); - } - - nextTask([]); -}; - -var _isArray = require('lodash/isArray'); - -var _isArray2 = _interopRequireDefault(_isArray); - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _once = require('./internal/once'); - -var _once2 = _interopRequireDefault(_once); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = exports['default']; - -/** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns undefined - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ \ No newline at end of file diff --git a/node_modules/async/whilst.js b/node_modules/async/whilst.js deleted file mode 100644 index 9c4d8f6..0000000 --- a/node_modules/async/whilst.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = whilst; - -var _noop = require('lodash/noop'); - -var _noop2 = _interopRequireDefault(_noop); - -var _slice = require('./internal/slice'); - -var _slice2 = _interopRequireDefault(_slice); - -var _onlyOnce = require('./internal/onlyOnce'); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = require('./internal/wrapAsync'); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Function} test - synchronous truth test to perform before each - * execution of `iteratee`. Invoked with (). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns undefined - * @example - * - * var count = 0; - * async.whilst( - * function() { return count < 5; }, - * function(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ -function whilst(test, iteratee, callback) { - callback = (0, _onlyOnce2.default)(callback || _noop2.default); - var _iteratee = (0, _wrapAsync2.default)(iteratee); - if (!test()) return callback(null); - var next = function (err /*, ...args*/) { - if (err) return callback(err); - if (test()) return _iteratee(next); - var args = (0, _slice2.default)(arguments, 1); - callback.apply(null, [null].concat(args)); - }; - _iteratee(next); -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/async/wrapSync.js b/node_modules/async/wrapSync.js deleted file mode 100644 index 5e3fc91..0000000 --- a/node_modules/async/wrapSync.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = asyncify; - -var _isObject = require('lodash/isObject'); - -var _isObject2 = _interopRequireDefault(_isObject); - -var _initialParams = require('./internal/initialParams'); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = require('./internal/setImmediate'); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if ((0, _isObject2.default)(result) && typeof result.then === 'function') { - result.then(function (value) { - invokeCallback(callback, null, value); - }, function (err) { - invokeCallback(callback, err.message ? err : new Error(err)); - }); - } else { - callback(null, result); - } - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (e) { - (0, _setImmediate2.default)(rethrow, e); - } -} - -function rethrow(error) { - throw error; -} -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/base64-js/LICENSE b/node_modules/base64-js/LICENSE deleted file mode 100644 index 6d52b8a..0000000 --- a/node_modules/base64-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/base64-js/README.md b/node_modules/base64-js/README.md deleted file mode 100644 index b42a48f..0000000 --- a/node_modules/base64-js/README.md +++ /dev/null @@ -1,34 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) - -Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. - -Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. - -## install - -With [npm](https://npmjs.org) do: - -`npm install base64-js` and `var base64js = require('base64-js')` - -For use in web browsers do: - -`` - -[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme) - -## methods - -`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `byteLength` - Takes a base64 string and returns length of byte array -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT diff --git a/node_modules/base64-js/base64js.min.js b/node_modules/base64-js/base64js.min.js deleted file mode 100644 index 908ac83..0000000 --- a/node_modules/base64-js/base64js.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json deleted file mode 100644 index c3972e3..0000000 --- a/node_modules/base64-js/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "base64-js", - "description": "Base64 encoding/decoding in pure JS", - "version": "1.5.1", - "author": "T. Jameson Little ", - "typings": "index.d.ts", - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "devDependencies": { - "babel-minify": "^0.5.1", - "benchmark": "^2.1.4", - "browserify": "^16.3.0", - "standard": "*", - "tape": "4.x" - }, - "homepage": "https://github.com/beatgammit/base64-js", - "keywords": [ - "base64" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "build": "browserify -s base64js -r ./ | minify > base64js.min.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/buffer/AUTHORS.md b/node_modules/buffer/AUTHORS.md deleted file mode 100644 index 22eb171..0000000 --- a/node_modules/buffer/AUTHORS.md +++ /dev/null @@ -1,70 +0,0 @@ -# Authors - -#### Ordered by first contribution. - -- Romain Beauxis (toots@rastageeks.org) -- Tobias Koppers (tobias.koppers@googlemail.com) -- Janus (ysangkok@gmail.com) -- Rainer Dreyer (rdrey1@gmail.com) -- Tõnis Tiigi (tonistiigi@gmail.com) -- James Halliday (mail@substack.net) -- Michael Williamson (mike@zwobble.org) -- elliottcable (github@elliottcable.name) -- rafael (rvalle@livelens.net) -- Andrew Kelley (superjoe30@gmail.com) -- Andreas Madsen (amwebdk@gmail.com) -- Mike Brevoort (mike.brevoort@pearson.com) -- Brian White (mscdex@mscdex.net) -- Feross Aboukhadijeh (feross@feross.org) -- Ruben Verborgh (ruben@verborgh.org) -- eliang (eliang.cs@gmail.com) -- Jesse Tane (jesse.tane@gmail.com) -- Alfonso Boza (alfonso@cloud.com) -- Mathias Buus (mathiasbuus@gmail.com) -- Devon Govett (devongovett@gmail.com) -- Daniel Cousens (github@dcousens.com) -- Joseph Dykstra (josephdykstra@gmail.com) -- Parsha Pourkhomami (parshap+git@gmail.com) -- Damjan Košir (damjan.kosir@gmail.com) -- daverayment (dave.rayment@gmail.com) -- kawanet (u-suke@kawa.net) -- Linus Unnebäck (linus@folkdatorn.se) -- Nolan Lawson (nolan.lawson@gmail.com) -- Calvin Metcalf (calvin.metcalf@gmail.com) -- Koki Takahashi (hakatasiloving@gmail.com) -- Guy Bedford (guybedford@gmail.com) -- Jan Schär (jscissr@gmail.com) -- RaulTsc (tomescu.raul@gmail.com) -- Matthieu Monsch (monsch@alum.mit.edu) -- Dan Ehrenberg (littledan@chromium.org) -- Kirill Fomichev (fanatid@ya.ru) -- Yusuke Kawasaki (u-suke@kawa.net) -- DC (dcposch@dcpos.ch) -- John-David Dalton (john.david.dalton@gmail.com) -- adventure-yunfei (adventure030@gmail.com) -- Emil Bay (github@tixz.dk) -- Sam Sudar (sudar.sam@gmail.com) -- Volker Mische (volker.mische@gmail.com) -- David Walton (support@geekstocks.com) -- Сковорода Никита Андреевич (chalkerx@gmail.com) -- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) -- ukstv (sergey.ukustov@machinomy.com) -- Renée Kooi (renee@kooi.me) -- ranbochen (ranbochen@qq.com) -- Vladimir Borovik (bobahbdb@gmail.com) -- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) -- kumavis (aaron@kumavis.me) -- Sergey Ukustov (sergey.ukustov@machinomy.com) -- Fei Liu (liu.feiwood@gmail.com) -- Blaine Bublitz (blaine.bublitz@gmail.com) -- clement (clement@seald.io) -- Koushik Dutta (koushd@gmail.com) -- Jordan Harband (ljharb@gmail.com) -- Niklas Mischkulnig (mischnic@users.noreply.github.com) -- Nikolai Vavilov (vvnicholas@gmail.com) -- Fedor Nezhivoi (gyzerok@users.noreply.github.com) -- Peter Newman (peternewman@users.noreply.github.com) -- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) -- jkkang (jkkang@smartauth.kr) - -#### Generated by bin/update-authors.sh. diff --git a/node_modules/buffer/LICENSE b/node_modules/buffer/LICENSE deleted file mode 100644 index d6bf75d..0000000 --- a/node_modules/buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/buffer/README.md b/node_modules/buffer/README.md deleted file mode 100644 index 9a23d7c..0000000 --- a/node_modules/buffer/README.md +++ /dev/null @@ -1,410 +0,0 @@ -# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg -[travis-url]: https://travis-ci.org/feross/buffer -[npm-image]: https://img.shields.io/npm/v/buffer.svg -[npm-url]: https://npmjs.org/package/buffer -[downloads-image]: https://img.shields.io/npm/dm/buffer.svg -[downloads-url]: https://npmjs.org/package/buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### The buffer module from [node.js](https://nodejs.org/), for the browser. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg -[saucelabs-url]: https://saucelabs.com/u/buffer - -With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. - -The goal is to provide an API that is 100% identical to -[node's Buffer API](https://nodejs.org/api/buffer.html). Read the -[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -## features - -- Manipulate binary data like a boss, in all browsers! -- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) -- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments) -- Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.) -- Preserves Node API exactly, with one minor difference (see below) -- Square-bracket `buf[4]` notation works! -- Does not modify any browser prototypes or put anything on `window` -- Comprehensive test suite (including all buffer tests from node.js core) - -## install - -To use this module directly (without browserify), install it: - -```bash -npm install buffer -``` - -This module was previously called **native-buffer-browserify**, but please use **buffer** -from now on. - -If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer). - -## usage - -The module's API is identical to node's `Buffer` API. Read the -[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, -instance methods, and class methods that are supported. - -As mentioned above, `require('buffer')` or use the `Buffer` global with -[browserify](http://browserify.org) and this module will automatically be included -in your bundle. Almost any npm module will work in the browser, even if it assumes that -the node `Buffer` API will be available. - -To depend on this module explicitly (without browserify), require it like this: - -```js -var Buffer = require('buffer/').Buffer // note: the trailing slash is important! -``` - -To require this module explicitly, use `require('buffer/')` which tells the node.js module -lookup algorithm (also used by browserify) to use the **npm module** named `buffer` -instead of the **node.js core** module named `buffer`! - - -## how does it work? - -The Buffer constructor returns instances of `Uint8Array` that have their prototype -changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, -so the returned instances will have all the node `Buffer` methods and the -`Uint8Array` methods. Square bracket notation works as expected -- it returns a -single octet. - -The `Uint8Array` prototype remains unmodified. - - -## tracking the latest node api - -This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer -API is considered **stable** in the -[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), -so it is unlikely that there will ever be breaking changes. -Nonetheless, when/if the Buffer API changes in node, this module's API will change -accordingly. - -## related packages - -- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer -- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer -- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package - -## conversion packages - -### convert typed array to buffer - -Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast. - -### convert buffer to typed array - -`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`. - -### convert blob to buffer - -Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`. - -### convert buffer to blob - -To convert a `Buffer` to a `Blob`, use the `Blob` constructor: - -```js -var blob = new Blob([ buffer ]) -``` - -Optionally, specify a mimetype: - -```js -var blob = new Blob([ buffer ], { type: 'text/html' }) -``` - -### convert arraybuffer to buffer - -To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast. - -```js -var buffer = Buffer.from(arrayBuffer) -``` - -### convert buffer to arraybuffer - -To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects): - -```js -var arrayBuffer = buffer.buffer.slice( - buffer.byteOffset, buffer.byteOffset + buffer.byteLength -) -``` - -Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module. - -## performance - -See perf tests in `/perf`. - -`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a -sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will -always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, -which is included to compare against. - -NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README. - -### Chrome 38 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | -| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | -| | | | | -| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | -| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | -| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | -| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | -| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | -| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | -| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | -| | | | | -| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | -| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | -| | | | | -| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | -| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | -| | | | | -| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | -| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | -| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | - - -### Firefox 33 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | -| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | -| | | | | -| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | -| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | -| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | -| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | -| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | -| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | -| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | -| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | -| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | -| | | | | -| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | -| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | -| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | - -### Safari 8 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | -| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | -| | | | | -| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | -| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | -| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | -| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | -| | | | | -| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | -| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | -| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | -| | | | | -| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | -| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | -| | | | | -| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | -| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | -| | | | | -| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | -| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | -| | | | | -| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | -| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | -| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | - - -### Node 0.11.14 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | -| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | -| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | -| | | | | -| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | -| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | -| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | -| | | | | -| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | -| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | -| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | -| | | | | -| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | -| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | -| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | -| | | | | -| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | -| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | -| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | -| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | -| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | -| | | | | -| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | -| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | -| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | -| | | | | -| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | -| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | -| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | -| | | | | -| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | -| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | -| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | -| | | | | -| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | -| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | -| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | -| | | | | -| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | -| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | -| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | - -### iojs 1.8.1 - -| Method | Operations | Accuracy | Sampled | Fastest | -|:-------|:-----------|:---------|:--------|:-------:| -| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | -| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | -| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | -| | | | | -| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | -| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | -| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | -| | | | | -| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | -| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | -| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | -| | | | | -| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | -| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | -| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | -| | | | | -| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | -| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | -| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | -| | | | | -| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | -| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | -| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | -| | | | | -| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | -| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | -| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | -| | | | | -| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | -| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | -| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | -| | | | | -| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | -| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | -| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | -| | | | | -| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | -| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | -| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | -| | | | | -| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | -| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | -| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | -| | | | | - -## Testing the project - -First, install the project: - - npm install - -Then, to run tests in Node.js, run: - - npm run test-node - -To test locally in a browser, you can run: - - npm run test-browser-es5-local # For ES5 browsers that don't support ES6 - npm run test-browser-es6-local # For ES6 compliant browsers - -This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap). - -To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: - - npm test - -This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files. - -## JavaScript Standard Style - -This module uses [JavaScript Standard Style](https://github.com/feross/standard). - -[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -To test that the code conforms to the style, `npm install` and run: - - ./node_modules/.bin/standard - -## credit - -This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). - -## Security Policies and Procedures - -The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues. - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/node_modules/buffer/index.d.ts b/node_modules/buffer/index.d.ts deleted file mode 100644 index 5d1a804..0000000 --- a/node_modules/buffer/index.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -export class Buffer extends Uint8Array { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - reverse(): this; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer | Uint8Array): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initializing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; -} diff --git a/node_modules/buffer/index.js b/node_modules/buffer/index.js deleted file mode 100644 index 609cf31..0000000 --- a/node_modules/buffer/index.js +++ /dev/null @@ -1,1817 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation - ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation - : null - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - var proto = { foo: function () { return 42 } } - Object.setPrototypeOf(proto, Uint8Array.prototype) - Object.setPrototypeOf(arr, proto) - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - Object.setPrototypeOf(buf, Buffer.prototype) - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayView(value) - } - - if (value == null) { - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof SharedArrayBuffer !== 'undefined' && - (isInstance(value, SharedArrayBuffer) || - (value && isInstance(value.buffer, SharedArrayBuffer)))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - var b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpreted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayView (arrayView) { - if (isInstance(arrayView, Uint8Array)) { - var copy = new Uint8Array(arrayView) - return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) - } - return fromArrayLike(arrayView) -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(buf, Buffer.prototype) - - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - if (pos + buf.length > buffer.length) { - Buffer.from(buf).copy(buffer, pos) - } else { - Uint8Array.prototype.set.call( - buffer, - buf, - pos - ) - } - } else if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } else { - buf.copy(buffer, pos) - } - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coercion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} -if (customInspectSymbol) { - Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - case 'latin1': - case 'binary': - return asciiWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) - ? 4 - : (firstByte > 0xDF) - ? 3 - : (firstByte > 0xBF) - ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += hexSliceLookupTable[buf[i]] - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) - for (var i = 0; i < bytes.length - 1; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(newBuf, Buffer.prototype) - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUintLE = -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUintBE = -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUint8 = -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUint16LE = -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUint16BE = -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUint32LE = -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUint32BE = -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUintLE = -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUintBE = -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUint8 = -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUint16LE = -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUint16BE = -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUint32LE = -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUint32BE = -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 - } else if (typeof val === 'boolean') { - val = Number(val) - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -// Create lookup table for `toString('hex')` -// See: https://github.com/feross/buffer/issues/219 -var hexSliceLookupTable = (function () { - var alphabet = '0123456789abcdef' - var table = new Array(256) - for (var i = 0; i < 16; ++i) { - var i16 = i * 16 - for (var j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j] - } - } - return table -})() diff --git a/node_modules/buffer/package.json b/node_modules/buffer/package.json deleted file mode 100644 index 3b1b498..0000000 --- a/node_modules/buffer/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "buffer", - "description": "Node.js Buffer API, for the browser", - "version": "5.7.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/buffer/issues" - }, - "contributors": [ - "Romain Beauxis ", - "James Halliday " - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - }, - "devDependencies": { - "airtap": "^3.0.0", - "benchmark": "^2.1.4", - "browserify": "^17.0.0", - "concat-stream": "^2.0.0", - "hyperquest": "^2.1.3", - "is-buffer": "^2.0.4", - "is-nan": "^1.3.0", - "split": "^1.0.1", - "standard": "*", - "tape": "^5.0.1", - "through2": "^4.0.2", - "uglify-js": "^3.11.3" - }, - "homepage": "https://github.com/feross/buffer", - "jspm": { - "map": { - "./index.js": { - "node": "@node/buffer" - } - } - }, - "keywords": [ - "arraybuffer", - "browser", - "browserify", - "buffer", - "compatible", - "dataview", - "uint8array" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/buffer.git" - }, - "scripts": { - "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", - "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", - "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", - "test": "standard && node ./bin/test.js", - "test-browser-es5": "airtap -- test/*.js", - "test-browser-es5-local": "airtap --local -- test/*.js", - "test-browser-es6": "airtap -- test/*.js test/node/*.js", - "test-browser-es6-local": "airtap --local -- test/*.js test/node/*.js", - "test-node": "tape test/*.js test/node/*.js", - "update-authors": "./bin/update-authors.sh" - }, - "standard": { - "ignore": [ - "test/node/**/*.js", - "test/common.js", - "test/_polyfill.js", - "perf/**/*.js" - ], - "globals": [ - "SharedArrayBuffer" - ] - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/deferred-leveldown/.travis.yml b/node_modules/deferred-leveldown/.travis.yml deleted file mode 100644 index 29d0b06..0000000 --- a/node_modules/deferred-leveldown/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js - -node_js: - - 6 - - 8 - - 10 - -notifications: - email: false - -before_script: git fetch --tags - -after_success: npm run coverage diff --git a/node_modules/deferred-leveldown/CHANGELOG.md b/node_modules/deferred-leveldown/CHANGELOG.md deleted file mode 100644 index 3cc1482..0000000 --- a/node_modules/deferred-leveldown/CHANGELOG.md +++ /dev/null @@ -1,329 +0,0 @@ -# Changelog - -## [5.3.0] - 2019-10-04 - -### Added - -- Add manifest ([Level/community#83](https://github.com/Level/community/issues/83)) ([#79](https://github.com/Level/deferred-leveldown/issues/79)) ([**@vweevers**](https://github.com/vweevers)) -- Include abstract test suite ([#77](https://github.com/Level/deferred-leveldown/issues/77)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Pass db to `AbstractIterator` ([#77](https://github.com/Level/deferred-leveldown/issues/77)) ([**@vweevers**](https://github.com/vweevers)) - -## [5.2.1] - 2019-09-17 - -### Fixed - -- Create iterators in order and add `type` property for `reachdown` ([#75](https://github.com/Level/deferred-leveldown/issues/75)) ([**@vweevers**](https://github.com/vweevers)) - -## [5.2.0] - 2019-09-06 - -### Changed - -- Upgrade `abstract-leveldown` from `~6.0.0` to `~6.1.0` ([#72](https://github.com/Level/deferred-leveldown/issues/72)) ([**@vweevers**](https://github.com/vweevers)) -- Upgrade `hallmark` devDependency from `^0.1.0` to `^2.0.0` ([#70](https://github.com/Level/deferred-leveldown/issues/70), [#74](https://github.com/Level/deferred-leveldown/issues/74)) ([**@vweevers**](https://github.com/vweevers)) -- Upgrade `standard` devDependency from `^12.0.0` to `^14.0.0` ([#69](https://github.com/Level/deferred-leveldown/issues/69), [#73](https://github.com/Level/deferred-leveldown/issues/73)) ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Defer `db.clear()` and `db.compactRange()` ([#72](https://github.com/Level/deferred-leveldown/issues/72)) - -## [5.1.0] - 2019-06-22 - -### Changed - -- Update `nyc` devDependency from `^13.2.0` to `^14.0.0` ([#66](https://github.com/Level/deferred-leveldown/issues/66)) ([**@vweevers**](https://github.com/vweevers)) - -### Added - -- Support seeking ([#68](https://github.com/Level/deferred-leveldown/issues/68)) ([**@MeirionHughes**](https://github.com/MeirionHughes)) - -## [5.0.1] - 2019-03-31 - -### Changed - -- Upgrade `nyc` devDependency from `^12.0.2` to `^13.2.0` ([#63](https://github.com/Level/deferred-leveldown/issues/63)) ([**@vweevers**](https://github.com/vweevers)) -- Apply common project tweaks ([#61](https://github.com/Level/deferred-leveldown/issues/61), [#62](https://github.com/Level/deferred-leveldown/issues/62), [`c4d169e`](https://github.com/Level/deferred-leveldown/commit/c4d169e)) ([**@vweevers**](https://github.com/vweevers)) - -### Fixed - -- Fix subtests by adding `t.plan()` ([#65](https://github.com/Level/deferred-leveldown/issues/65)) ([**@vweevers**](https://github.com/vweevers)) - -## [5.0.0] - 2018-12-21 - -### Changed - -- Upgrade `abstract-leveldown` dependency from `~5.0.0` to `~6.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Upgrade `standard` devDependency from `^11.0.0` to `^12.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Tweak copyright years for less maintenance ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Added - -- Add `nyc` and `coveralls` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Remove contributors from `package.json` ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Remove node 9 ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [4.0.2] - 2018-05-30 - -### Changed - -- Replace `util.inherits` with `inherits` module ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [4.0.1] - 2018-05-22 - -### Changed - -- Upgrade `abstract-leveldown` to `5.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [4.0.0] - 2018-05-13 - -### Added - -- Add node 10 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Changed - -- Upgrade to `standard@11.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Remove node 4 from Travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [3.0.0] - 2018-02-08 - -### Added - -- Add `9` to travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Changed - -- Upgrade to `abstract-leveldown@4.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Remove `DeferredLevelDOWN.prototype._isBuffer`, no longer needed since we use `Buffer.isBuffer()` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- Defer `approximateSize()` separately ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Fix broken link in `README` and clean up old `.jshintrc` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -**Historical Note** `abstract-leveldown@4.0.0` dropped `approximateSize()` so we needed to defer this method separately for stores that support it. - -## [2.0.3] - 2017-11-04 - -### Added - -- Add `4` to travis ([**@vweevers**](https://github.com/vweevers)) -- Add node badge ([**@vweevers**](https://github.com/vweevers)) - -### Changed - -- Upgrade to `abstract-leveldown@3.0.0` ([**@vweevers**](https://github.com/vweevers)) - -**Historical Note** `abstract-leveldown@3.0.0` dropped support for node `0.12` and didn't have any breaking changes to api or behavior, hence a new patch version. - -## [2.0.2] - 2017-10-06 - -### Added - -- Add `standard` for linting ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Changed - -- Use svg instead of png for travis badge ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Update to new badge setup ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Fixed - -- `_serializeKey()` and `_serializeValue()` should not modify keys or values ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.0.1] - 2017-09-12 - -### Added - -- Add Greenkeeper badge ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Add `6` and `8` to travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Changed - -- Upgrade to `abstract-leveldown@2.7.0` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Removed - -- Remove `0.8`, `0.10` and `0.11` from travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.0.0] - 2017-07-30 - -### Changed - -- Update dependencies ([**@ralphtheninja**](https://github.com/ralphtheninja)) -- Update copyright years ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [2.0.0-2] - 2015-05-28 - -### Fixed - -- Fix `.iterator()` after db is opened ([**@juliangruber**](https://github.com/juliangruber)) - -## [2.0.0-1] - 2015-05-28 - -No changes. - -## [2.0.0-0] - 2015-05-27 - -### Changed - -- Upgrade to `abstract-leveldown@2.4.0` for `.status` ([**@juliangruber**](https://github.com/juliangruber)) -- Change api to `leveldown` api ([**@juliangruber**](https://github.com/juliangruber)) - -## [1.2.2] - 2017-07-30 - -### Added - -- Add `4`, `6` and `7` to travis ([**@juliangruber**](https://github.com/juliangruber)) -- Add `8` to travis ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -### Changed - -- Update `tape` and `abstract-leveldown` dependencies ([**@juliangruber**](https://github.com/juliangruber)) - -### Removed - -- Remove `0.10` from travis ([**@juliangruber**](https://github.com/juliangruber)) - -## [1.2.1] - 2015-08-14 - -### Added - -- Add `0.12`, `2.5` and `3.0` to travis ([**@juliangruber**](https://github.com/juliangruber)) - -### Removed - -- Remove `0.8` and `0.11` from travis ([**@juliangruber**](https://github.com/juliangruber)) - -### Fixed - -- Fix iterator after `setDb` case ([**@substack**](https://github.com/substack)) -- Fix broken travis link ([**@juliangruber**](https://github.com/juliangruber)) - -## [1.2.0] - 2015-05-28 - -### Changed - -- Upgrade to `abstract-leveldown@2.4.0` for `.status` ([**@juliangruber**](https://github.com/juliangruber)) - -## [1.1.0] - 2015-05-22 - -### Changed - -- Export `DeferredIterator` ([**@juliangruber**](https://github.com/juliangruber)) - -## [1.0.0] - 2015-04-28 - -### Changed - -- Upgrade to `abstract-leveldown@2.1.2` ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [0.3.0] - 2015-04-16 - -### Added - -- Add support for deferred iterators ([**@juliangruber**](https://github.com/juliangruber)) - -### Changed - -- Change to plain `MIT` license ([**@andrewrk**](https://github.com/andrewrk)) -- Update logo and copyright ([**@ralphtheninja**](https://github.com/ralphtheninja)) - -## [0.2.0] - 2014-04-26 - -### Removed - -- Remove `bops` and replace with `Buffer` ([**@rvagg**](https://github.com/rvagg)) - -## [0.1.0] - 2013-10-14 - -### Changed - -- `location` passed to `AbstractLevelDOWN` constructor is optional ([**@rvagg**](https://github.com/rvagg)) - -### Removed - -- Remove `npm-dl` badge ([**@rvagg**](https://github.com/rvagg)) - -### Fixed - -- Fix broken travis badge ([**@rvagg**](https://github.com/rvagg)) -- Fix links from `rvagg/` to `Level/` ([**@rvagg**](https://github.com/rvagg)) - -## [0.0.1] - 2013-09-30 - -### Added - -- Add tests ([**@rvagg**](https://github.com/rvagg)) -- Add node `0.10` and `0.11` to travis ([**@rvagg**](https://github.com/rvagg)) - -### Changed - -- Update documentation ([**@rvagg**](https://github.com/rvagg)) - -## 0.0.0 - 2013-09-17 - -:seedling: First release. ([**@rvagg**](https://github.com/rvagg)) - -[5.3.0]: https://github.com/Level/deferred-leveldown/compare/v5.2.1...v5.3.0 - -[5.2.1]: https://github.com/Level/deferred-leveldown/compare/v5.2.0...v5.2.1 - -[5.2.0]: https://github.com/Level/deferred-leveldown/compare/v5.1.0...v5.2.0 - -[5.1.0]: https://github.com/Level/deferred-leveldown/compare/v5.0.1...v5.1.0 - -[5.0.1]: https://github.com/Level/deferred-leveldown/compare/v5.0.0...v5.0.1 - -[5.0.0]: https://github.com/Level/deferred-leveldown/compare/v4.0.2...v5.0.0 - -[4.0.2]: https://github.com/Level/deferred-leveldown/compare/v4.0.1...v4.0.2 - -[4.0.1]: https://github.com/Level/deferred-leveldown/compare/v4.0.0...v4.0.1 - -[4.0.0]: https://github.com/Level/deferred-leveldown/compare/v3.0.0...v4.0.0 - -[3.0.0]: https://github.com/Level/deferred-leveldown/compare/v2.0.3...v3.0.0 - -[2.0.3]: https://github.com/Level/deferred-leveldown/compare/v2.0.2...v2.0.3 - -[2.0.2]: https://github.com/Level/deferred-leveldown/compare/v2.0.1...v2.0.2 - -[2.0.1]: https://github.com/Level/deferred-leveldown/compare/v2.0.0...v2.0.1 - -[2.0.0]: https://github.com/Level/deferred-leveldown/compare/v2.0.0-2...v2.0.0 - -[2.0.0-2]: https://github.com/Level/deferred-leveldown/compare/v2.0.0-1...v2.0.0-2 - -[2.0.0-1]: https://github.com/Level/deferred-leveldown/compare/v2.0.0-0...v2.0.0-1 - -[2.0.0-0]: https://github.com/Level/deferred-leveldown/compare/v1.2.2...v2.0.0-0 - -[1.2.2]: https://github.com/Level/deferred-leveldown/compare/v1.2.1...v1.2.2 - -[1.2.1]: https://github.com/Level/deferred-leveldown/compare/v1.2.0...v1.2.1 - -[1.2.0]: https://github.com/Level/deferred-leveldown/compare/v1.1.0...v1.2.0 - -[1.1.0]: https://github.com/Level/deferred-leveldown/compare/v1.0.0...v1.1.0 - -[1.0.0]: https://github.com/Level/deferred-leveldown/compare/v0.3.0...v1.0.0 - -[0.3.0]: https://github.com/Level/deferred-leveldown/compare/v0.2.0...v0.3.0 - -[0.2.0]: https://github.com/Level/deferred-leveldown/compare/0.1.0...v0.2.0 - -[0.1.0]: https://github.com/Level/deferred-leveldown/compare/0.0.1...0.1.0 - -[0.0.1]: https://github.com/Level/deferred-leveldown/compare/0.0.0...0.0.1 diff --git a/node_modules/deferred-leveldown/CONTRIBUTORS.md b/node_modules/deferred-leveldown/CONTRIBUTORS.md deleted file mode 100644 index 5e0d8f4..0000000 --- a/node_modules/deferred-leveldown/CONTRIBUTORS.md +++ /dev/null @@ -1,10 +0,0 @@ -# Contributors - -| Name | GitHub | Social | -| :------------------- | :----------------------------------------------------- | :------------------------------------------------------------ | -| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) | -| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | -| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) | -| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) | -| **Meirion Hughes** | [**@MeirionHughes**](https://github.com/MeirionHughes) | | -| **Andrew Kelley** | [**@andrewrk**](https://github.com/andrewrk) | | diff --git a/node_modules/deferred-leveldown/LICENSE.md b/node_modules/deferred-leveldown/LICENSE.md deleted file mode 100644 index 1e78cf8..0000000 --- a/node_modules/deferred-leveldown/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -**Copyright © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md).** - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/deferred-leveldown/README.md b/node_modules/deferred-leveldown/README.md deleted file mode 100644 index 9662ab5..0000000 --- a/node_modules/deferred-leveldown/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# deferred-leveldown - -> A mock `abstract-leveldown` implementation that queues operations while a real `abstract-leveldown` instance is being opened. - -[![level badge][level-badge]](https://github.com/Level/awesome) -[![npm](https://img.shields.io/npm/v/deferred-leveldown.svg?label=&logo=npm)](https://www.npmjs.com/package/deferred-leveldown) -[![Node version](https://img.shields.io/node/v/deferred-leveldown.svg)](https://www.npmjs.com/package/deferred-leveldown) -[![Travis](https://img.shields.io/travis/Level/deferred-leveldown.svg?logo=travis&label=)](https://travis-ci.org/Level/deferred-leveldown) -[![Coverage Status](https://coveralls.io/repos/github/Level/deferred-leveldown/badge.svg)](https://coveralls.io/github/Level/deferred-leveldown) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -[![npm](https://img.shields.io/npm/dm/deferred-leveldown.svg?label=dl)](https://www.npmjs.com/package/deferred-leveldown) -[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) -[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors) - -`deferred-leveldown` implements the basic [abstract-leveldown](https://github.com/Level/abstract-leveldown) API so it can be used as a drop-in replacement where `leveldown` is needed. - -`put()`, `get()`, `del()`, `batch()` and `clear()` operations are all queued and kept in memory until the `abstract-leveldown`-compatible object has been opened through `deferred-leveldown`'s `open()` method. - -`batch()` operations will all be replayed as the array form. Chained-batch operations are converted before being stored. - -```js -const deferred = require('deferred-leveldown') -const leveldown = require('leveldown') - -const db = deferred(leveldown('location')) - -db.put('foo', 'bar', function (err) { - -}) - -db.open(function (err) { - // ... -}) -``` - -**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md). - -## Contributing - -[`Level/deferred-leveldown`](https://github.com/Level/deferred-leveldown) is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details. - -## Donate - -To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖 - -### Backers - -[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level) - -### Sponsors - -[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level) - -## License - -[MIT](LICENSE.md) © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md). - -[level-badge]: https://leveljs.org/img/badge.svg diff --git a/node_modules/deferred-leveldown/UPGRADING.md b/node_modules/deferred-leveldown/UPGRADING.md deleted file mode 100644 index 3887e10..0000000 --- a/node_modules/deferred-leveldown/UPGRADING.md +++ /dev/null @@ -1,19 +0,0 @@ -# Upgrade Guide - -This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md). - -## v5 - - Upgraded `abstract-leveldown` to `v6.0.0`. Please see the corresponding [changelog entry](https://github.com/Level/abstract-leveldown/blob/master/CHANGELOG.md#600---2018-10-20) for more information. - -## v4 - -Dropped support for node 4. No other breaking changes. - -## v3 - -#### `.batch(array)` enforces objects - -This major release contains an upgrade to `abstract-leveldown` with a [breaking change](https://github.com/Level/abstract-leveldown/commit/a2621ad70571f6ade9d2be42632ece042e068805) for the array version of `.batch()`. This change ensures all elements in the batch array are objects. - -If you previously passed arrays to `.batch()` that contained `undefined` or `null`, they would be silently ignored. Now this will produce an error. diff --git a/node_modules/deferred-leveldown/deferred-iterator.js b/node_modules/deferred-leveldown/deferred-iterator.js deleted file mode 100644 index 28149e1..0000000 --- a/node_modules/deferred-leveldown/deferred-iterator.js +++ /dev/null @@ -1,37 +0,0 @@ -var AbstractIterator = require('abstract-leveldown').AbstractIterator -var inherits = require('inherits') - -function DeferredIterator (db, options) { - AbstractIterator.call(this, db) - - this._options = options - this._iterator = null - this._operations = [] -} - -inherits(DeferredIterator, AbstractIterator) - -DeferredIterator.prototype.setDb = function (db) { - var it = this._iterator = db.iterator(this._options) - this._operations.forEach(function (op) { - it[op.method].apply(it, op.args) - }) -} - -DeferredIterator.prototype._operation = function (method, args) { - if (this._iterator) return this._iterator[method].apply(this._iterator, args) - this._operations.push({ method: method, args: args }) -} - -'next end'.split(' ').forEach(function (m) { - DeferredIterator.prototype['_' + m] = function () { - this._operation(m, arguments) - } -}) - -// Must defer seek() rather than _seek() because it requires db._serializeKey to be available -DeferredIterator.prototype.seek = function () { - this._operation('seek', arguments) -} - -module.exports = DeferredIterator diff --git a/node_modules/deferred-leveldown/deferred-leveldown.js b/node_modules/deferred-leveldown/deferred-leveldown.js deleted file mode 100644 index a0ff624..0000000 --- a/node_modules/deferred-leveldown/deferred-leveldown.js +++ /dev/null @@ -1,97 +0,0 @@ -var AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN -var inherits = require('inherits') -var DeferredIterator = require('./deferred-iterator') -var deferrables = 'put get del batch clear'.split(' ') -var optionalDeferrables = 'approximateSize compactRange'.split(' ') - -function DeferredLevelDOWN (db) { - AbstractLevelDOWN.call(this, db.supports || {}) - - // TODO (future major): remove this fallback; db must have manifest that - // declares approximateSize and compactRange in additionalMethods. - optionalDeferrables.forEach(function (m) { - if (typeof db[m] === 'function' && !this.supports.additionalMethods[m]) { - this.supports.additionalMethods[m] = true - } - }, this) - - this._db = db - this._operations = [] - closed(this) -} - -inherits(DeferredLevelDOWN, AbstractLevelDOWN) - -DeferredLevelDOWN.prototype.type = 'deferred-leveldown' - -DeferredLevelDOWN.prototype._open = function (options, callback) { - var self = this - - this._db.open(options, function (err) { - if (err) return callback(err) - - self._operations.forEach(function (op) { - if (op.iterator) { - op.iterator.setDb(self._db) - } else { - self._db[op.method].apply(self._db, op.args) - } - }) - self._operations = [] - - open(self) - callback() - }) -} - -DeferredLevelDOWN.prototype._close = function (callback) { - var self = this - - this._db.close(function (err) { - if (err) return callback(err) - closed(self) - callback() - }) -} - -function open (self) { - deferrables.concat('iterator').forEach(function (m) { - self['_' + m] = function () { - return this._db[m].apply(this._db, arguments) - } - }) - Object.keys(self.supports.additionalMethods).forEach(function (m) { - self[m] = function () { - return this._db[m].apply(this._db, arguments) - } - }) -} - -function closed (self) { - deferrables.forEach(function (m) { - self['_' + m] = function () { - this._operations.push({ method: m, args: arguments }) - } - }) - Object.keys(self.supports.additionalMethods).forEach(function (m) { - self[m] = function () { - this._operations.push({ method: m, args: arguments }) - } - }) - self._iterator = function (options) { - var it = new DeferredIterator(self, options) - this._operations.push({ iterator: it }) - return it - } -} - -DeferredLevelDOWN.prototype._serializeKey = function (key) { - return key -} - -DeferredLevelDOWN.prototype._serializeValue = function (value) { - return value -} - -module.exports = DeferredLevelDOWN -module.exports.DeferredIterator = DeferredIterator diff --git a/node_modules/deferred-leveldown/package.json b/node_modules/deferred-leveldown/package.json deleted file mode 100644 index 9ce3a83..0000000 --- a/node_modules/deferred-leveldown/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "deferred-leveldown", - "version": "5.3.0", - "description": "For handling delayed-open on LevelDOWN compatible libraries", - "license": "MIT", - "main": "deferred-leveldown.js", - "scripts": { - "test": "standard && hallmark && nyc node test.js", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "hallmark": "hallmark --fix", - "dependency-check": "dependency-check . test.js", - "prepublishOnly": "npm run dependency-check" - }, - "dependencies": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "devDependencies": { - "coveralls": "^3.0.2", - "dependency-check": "^3.3.0", - "hallmark": "^2.0.0", - "level-community": "^3.0.0", - "memdown": "^5.0.0", - "nyc": "^14.0.0", - "reachdown": "^1.0.0", - "standard": "^14.0.0", - "tape": "^4.10.0" - }, - "hallmark": { - "community": "level-community" - }, - "repository": { - "type": "git", - "url": "https://github.com/Level/deferred-leveldown.git" - }, - "homepage": "https://github.com/Level/deferred-leveldown", - "keywords": [ - "leveldb", - "level", - "levelup", - "leveldown" - ], - "engines": { - "node": ">=6" - } -} diff --git a/node_modules/deferred-leveldown/test.js b/node_modules/deferred-leveldown/test.js deleted file mode 100644 index ed8d353..0000000 --- a/node_modules/deferred-leveldown/test.js +++ /dev/null @@ -1,566 +0,0 @@ -var test = require('tape') -var reachdown = require('reachdown') -var memdown = require('memdown') -var suite = require('abstract-leveldown/test') -var DeferredLevelDOWN = require('./') -var noop = function () {} - -const testCommon = suite.common({ - test: test, - factory: function () { - return new DeferredLevelDOWN(memdown()) - }, - - // Unsupported features - createIfMissing: false, - errorIfExists: false, - - // Opt-in to new clear() tests - clear: true -}) - -// Hack: disable failing tests. These fail on serialize tests -require('abstract-leveldown/test/put-test').args = noop -require('abstract-leveldown/test/get-test').args = noop -require('abstract-leveldown/test/del-test').args = noop - -// This fails on "iterator has db reference" test, as expected because -// the return value of db.iterator() depends on whether the db is open. -require('abstract-leveldown/test/iterator-test').args = noop - -// Test abstract-leveldown compliance -suite(testCommon) - -// Custom tests -test('deferred open gets correct options', function (t) { - var OPTIONS = { foo: 'BAR' } - var db = { - open: function (options, callback) { - t.same(options, OPTIONS, 'options passed on to open') - process.nextTick(callback) - } - } - - var ld = new DeferredLevelDOWN(db) - ld.open(OPTIONS, function (err) { - t.error(err, 'no error') - t.end() - }) -}) - -test('single operation', function (t) { - var called = false - var db = { - put: function (key, value, options, callback) { - t.equal(key, 'foo', 'correct key') - t.equal(value, 'bar', 'correct value') - t.deepEqual({}, options, 'empty options') - callback(null, 'called') - }, - open: function (options, callback) { - process.nextTick(callback) - } - } - - var ld = new DeferredLevelDOWN(db) - ld.put('foo', 'bar', function (err, v) { - t.error(err, 'no error') - called = v - }) - - t.ok(called === false, 'not called') - - ld.open(function (err) { - t.error(err, 'no error') - t.ok(called === 'called', 'function called') - t.end() - }) -}) - -test('many operations', function (t) { - var calls = [] - var db = { - put: function (key, value, options, callback) { - if (puts++ === 0) { - t.equal(key, 'foo1', 'correct key') - t.equal(value, 'bar1', 'correct value') - t.deepEqual(options, {}, 'empty options') - } else { - t.equal(key, 'foo2', 'correct key') - t.equal(value, 'bar2', 'correct value') - t.deepEqual(options, {}, 'empty options') - } - callback(null, 'put' + puts) - }, - get: function (key, options, callback) { - if (gets++ === 0) { - t.equal('woo1', key, 'correct key') - t.deepEqual(options, { asBuffer: true }, 'empty options') - } else { - t.equal('woo2', key, 'correct key') - t.deepEqual(options, { asBuffer: true }, 'empty options') - } - callback(null, 'gets' + gets) - }, - del: function (key, options, callback) { - t.equal('blergh', key, 'correct key') - t.deepEqual(options, {}, 'empty options') - callback(null, 'del') - }, - batch: function (arr, options, callback) { - if (batches++ === 0) { - t.deepEqual(arr, [ - { type: 'put', key: 'k1', value: 'v1' }, - { type: 'put', key: 'k2', value: 'v2' } - ], 'correct batch') - } else { - t.deepEqual(arr, [ - { type: 'put', key: 'k3', value: 'v3' }, - { type: 'put', key: 'k4', value: 'v4' } - ], 'correct batch') - } - callback() - }, - clear: function (options, callback) { - if (clears++ === 0) { - t.deepEqual(options, { reverse: false, limit: -1 }, 'default options') - } else { - t.deepEqual(options, { gt: 'k5', reverse: false, limit: -1 }, 'range option') - } - - callback() - }, - open: function (options, callback) { - process.nextTick(callback) - } - } - - var ld = new DeferredLevelDOWN(db) - var puts = 0 - var gets = 0 - var batches = 0 - var clears = 0 - - ld.put('foo1', 'bar1', function (err, v) { - t.error(err, 'no error') - calls.push({ type: 'put', key: 'foo1', v: v }) - }) - ld.get('woo1', function (err, v) { - t.error(err, 'no error') - calls.push({ type: 'get', key: 'woo1', v: v }) - }) - ld.clear(function () { - calls.push({ type: 'clear' }) - }) - ld.put('foo2', 'bar2', function (err, v) { - t.error(err, 'no error') - calls.push({ type: 'put', key: 'foo2', v: v }) - }) - ld.get('woo2', function (err, v) { - t.error(err, 'no error') - calls.push({ type: 'get', key: 'woo2', v: v }) - }) - ld.del('blergh', function (err, v) { - t.error(err, 'no error') - calls.push({ type: 'del', key: 'blergh', v: v }) - }) - ld.batch([ - { type: 'put', key: 'k1', value: 'v1' }, - { type: 'put', key: 'k2', value: 'v2' } - ], function () { - calls.push({ type: 'batch', keys: 'k1,k2' }) - }) - ld - .batch() - .put('k3', 'v3') - .put('k4', 'v4') - .write(function () { - calls.push({ type: 'batch', keys: 'k3,k4' }) - }) - ld.clear({ gt: 'k5' }, function () { - calls.push({ type: 'clear', gt: 'k5' }) - }) - - t.ok(calls.length === 0, 'not called') - - ld.open(function (err) { - t.error(err, 'no error') - - t.equal(calls.length, 9, 'all functions called') - t.deepEqual(calls, [ - { type: 'put', key: 'foo1', v: 'put1' }, - { type: 'get', key: 'woo1', v: 'gets1' }, - { type: 'clear' }, - { type: 'put', key: 'foo2', v: 'put2' }, - { type: 'get', key: 'woo2', v: 'gets2' }, - { type: 'del', key: 'blergh', v: 'del' }, - { type: 'batch', keys: 'k1,k2' }, - { type: 'batch', keys: 'k3,k4' }, - { type: 'clear', gt: 'k5' } - ], 'calls correctly behaved') - - t.end() - }) -}) - -test('keys and values should not be serialized', function (t) { - var DATA = [] - var ITEMS = [ - 123, - 'a string', - Buffer.from('w00t'), - { an: 'object' } - ] - ITEMS.forEach(function (k) { - ITEMS.forEach(function (v) { - DATA.push({ key: k, value: v }) - }) - }) - - function Db (m, fn) { - var db = { - open: function (options, cb) { - process.nextTick(cb) - } - } - var wrapper = function () { - fn.apply(null, arguments) - } - db[m] = wrapper - return new DeferredLevelDOWN(db) - } - - function noop () {} - - t.plan(8) - - t.test('put', function (t) { - var calls = [] - var ld = Db('put', function (key, value, cb) { - calls.push({ key: key, value: value }) - }) - DATA.forEach(function (d) { ld.put(d.key, d.value, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, DATA, 'value ok') - t.end() - }) - }) - - t.test('get', function (t) { - var calls = [] - var ld = Db('get', function (key, cb) { calls.push(key) }) - ITEMS.forEach(function (key) { ld.get(key, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, ITEMS, 'value ok') - t.end() - }) - }) - - t.test('del', function (t) { - var calls = [] - var ld = Db('del', function (key, cb) { calls.push(key) }) - ITEMS.forEach(function (key) { ld.del(key, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, ITEMS, 'value ok') - t.end() - }) - }) - - t.test('clear', function (t) { - var calls = [] - var ld = Db('clear', function (opts, cb) { calls.push(opts) }) - ITEMS.forEach(function (key) { ld.clear({ gt: key }, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, ITEMS.map(function (key) { - return { gt: key, reverse: false, limit: -1 } - }), 'value ok') - t.end() - }) - }) - - t.test('approximateSize', function (t) { - var calls = [] - var ld = Db('approximateSize', function (start, end, cb) { - calls.push({ start: start, end: end }) - }) - ITEMS.forEach(function (key) { ld.approximateSize(key, key, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, ITEMS.map(function (i) { - return { start: i, end: i } - }), 'value ok') - t.end() - }) - }) - - t.test('store not supporting approximateSize', function (t) { - var ld = Db('FOO', function () {}) - t.throws(function () { - ld.approximateSize('key', 'key', noop) - }, /approximateSize is not a function/) - t.end() - }) - - t.test('compactRange', function (t) { - var calls = [] - var ld = Db('compactRange', function (start, end, cb) { - calls.push({ start: start, end: end }) - }) - ITEMS.forEach(function (key) { ld.compactRange(key, key, noop) }) - ld.open(function (err) { - t.error(err, 'no error') - t.same(calls, ITEMS.map(function (i) { - return { start: i, end: i } - }), 'value ok') - t.end() - }) - }) - - t.test('store not supporting compactRange', function (t) { - var ld = Db('FOO', function () {}) - t.throws(function () { - ld.compactRange('key', 'key', noop) - }, /compactRange is not a function/) - t.end() - }) -}) - -test('_close calls close for underlying store', function (t) { - t.plan(2) - - var db = { - close: function (callback) { - t.pass('close for underlying store is called') - process.nextTick(callback) - } - } - var ld = new DeferredLevelDOWN(db) - - ld.close(function (err) { - t.error(err, 'no error') - }) -}) - -test('open error on underlying store calls back with error', function (t) { - t.plan(2) - - var db = { - open: function (options, callback) { - t.pass('db.open called') - process.nextTick(callback, new Error('foo')) - } - } - var ld = new DeferredLevelDOWN(db) - - ld.open(function (err) { - t.is(err.message, 'foo') - }) -}) - -test('close error on underlying store calls back with error', function (t) { - t.plan(2) - - var db = { - close: function (callback) { - t.pass('db.close called') - process.nextTick(callback, new Error('foo')) - } - } - var ld = new DeferredLevelDOWN(db) - - ld.close(function (err) { - t.is(err.message, 'foo') - }) -}) - -test('non-deferred approximateSize', function (t) { - t.plan(4) - - var db = { - open: function (options, cb) { - process.nextTick(cb) - }, - approximateSize: function (start, end, callback) { - t.is(start, 'bar') - t.is(end, 'foo') - process.nextTick(callback) - } - } - var ld = new DeferredLevelDOWN(db) - - ld.open(function (err) { - t.error(err) - ld.approximateSize('bar', 'foo', function (err) { - t.error(err) - }) - }) -}) - -test('non-deferred compactRange', function (t) { - t.plan(4) - - var db = { - open: function (options, cb) { - process.nextTick(cb) - }, - compactRange: function (start, end, callback) { - t.is(start, 'bar') - t.is(end, 'foo') - process.nextTick(callback) - } - } - var ld = new DeferredLevelDOWN(db) - - ld.open(function (err) { - t.error(err) - ld.compactRange('bar', 'foo', function (err) { - t.error(err) - }) - }) -}) - -test('iterator - deferred operations', function (t) { - t.plan(9) - - var seekTarget = false - - var db = { - iterator: function (options) { - return { - seek: function (target) { - seekTarget = target - }, - next: function (cb) { - cb(null, 'key', 'value') - }, - end: function (cb) { - process.nextTick(cb) - } - } - }, - open: function (options, callback) { - process.nextTick(callback) - } - } - var ld = new DeferredLevelDOWN(db) - var it = ld.iterator() - var nextFirst = false - - it.seek('foo') - - it.next(function (err, key, value) { - t.is(seekTarget, 'foo', 'seek was called with correct target') - nextFirst = true - t.error(err, 'no error') - t.equal(key, 'key') - t.equal(value, 'value') - }) - - it.end(function (err) { - t.error(err, 'no error') - t.ok(nextFirst) - }) - - ld.open(function (err) { - t.error(err, 'no error') - var it2 = ld.iterator() - it2.end(t.error.bind(t)) - }) - - t.ok(require('./').DeferredIterator) -}) - -test('iterator - non deferred operation', function (t) { - t.plan(5) - var seekTarget = false - - var db = { - iterator: function (options) { - return { - next: function (cb) { - cb(null, 'key', 'value') - }, - seek: function (target) { - seekTarget = target - }, - end: function (cb) { - process.nextTick(cb) - } - } - }, - open: function (options, callback) { - process.nextTick(callback) - } - } - var ld = new DeferredLevelDOWN(db) - var it = ld.iterator() - - ld.open(function (err) { - t.error(err, 'no error') - - it.seek('foo') - - t.is(seekTarget, 'foo', 'seek was called with correct target') - - it.next(function (err, key, value) { - t.error(err, 'no error') - t.equal(key, 'key') - t.equal(value, 'value') - }) - }) -}) - -test('iterator - is created in order', function (t) { - t.plan(4) - - function db () { - return { - order: [], - iterator: function (options) { - this.order.push('iterator created') - return {} - }, - put: function (key, value, options, callback) { - this.order.push('put') - }, - open: function (options, callback) { - process.nextTick(callback) - } - } - } - - var ld1 = new DeferredLevelDOWN(db()) - var ld2 = new DeferredLevelDOWN(db()) - - ld1.iterator() - ld1.put('key', 'value', noop) - - ld2.put('key', 'value', noop) - ld2.iterator() - - ld1.open(function (err) { - t.error(err, 'no error') - t.same(ld1._db.order, ['iterator created', 'put']) - }) - - ld2.open(function (err) { - t.error(err, 'no error') - t.same(ld2._db.order, ['put', 'iterator created']) - }) -}) - -test('reachdown supports deferred-leveldown', function (t) { - // Define just enough methods for reachdown to see this as a real db - var db = { open: noop, _batch: noop, _iterator: noop } - var ld = new DeferredLevelDOWN(db) - - t.is(ld.type, 'deferred-leveldown') - t.is(reachdown(ld, 'deferred-leveldown'), ld) - t.is(reachdown(ld), db) - - t.end() -}) diff --git a/node_modules/doublearray/.gitignore~ b/node_modules/doublearray/.gitignore~ deleted file mode 100644 index 175493d..0000000 --- a/node_modules/doublearray/.gitignore~ +++ /dev/null @@ -1,33 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules -bower_components -components - -# Users Environment Variables -.lock-wscript - -# Others -.DS_Store -build -*.node -*.orig -.idea -sandbox -test/out-fixtures/* -test/watch-*.txt -gulp.1 -.grunt diff --git a/node_modules/doublearray/.jshintrc b/node_modules/doublearray/.jshintrc deleted file mode 100644 index 1a16b1f..0000000 --- a/node_modules/doublearray/.jshintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "quotmark": "double", - "shadow": "outer", - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "unused": "vars", - "boss": true, - "eqnull": true, - "trailing": true, - "browser": true, - "node": true -} \ No newline at end of file diff --git a/node_modules/doublearray/.npmignore b/node_modules/doublearray/.npmignore deleted file mode 100644 index 57d72a5..0000000 --- a/node_modules/doublearray/.npmignore +++ /dev/null @@ -1,40 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules -bower_components -components - -# Users Environment Variables -.lock-wscript - -# Compiled Node.js modules -*.node - -# IntelliJ -.idea -*.iml - -# Build system -build -gulp.1 -.grunt - -# Others -.DS_Store -*.orig -sandbox -test/out-fixtures/* -test/watch-*.txt diff --git a/node_modules/doublearray/LICENSE.txt b/node_modules/doublearray/LICENSE.txt deleted file mode 100644 index cd17f43..0000000 --- a/node_modules/doublearray/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Takuya Asano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/doublearray/README.md b/node_modules/doublearray/README.md deleted file mode 100644 index 31ea49b..0000000 --- a/node_modules/doublearray/README.md +++ /dev/null @@ -1,81 +0,0 @@ -Double-Array -============ - -JavaScript implementation of Double-Array trie. - - -Usage ------ - -### Build - -Node.js example - - var doublearray = require('./doublearray.js'); - - var words = [ - { k: 'a', v: 1 }, - { k: 'abc', v: 2 }, - { k: '奈良', v: 3 }, - { k: '奈良先端', v: 4 }, - { k: '奈良先端科学技術大学院大学', v: 5 } - ]; - - var trie = doublearray.builder().build(words); - -Browser example - - var words = [ - { k: 'a', v: 1 }, - { k: 'abc', v: 2 }, - { k: '奈良', v: 3 }, - { k: '奈良先端', v: 4 }, - { k: '奈良先端科学技術大学院大学', v: 5 } - ]; - - var trie = doublearray.builder().build(words); - - -Method chaining - - var trie = doublearray - .builder() - .append('a', 1) - .append('abc', 2) - .append('奈良', 3) - .append('奈良先端', 4) - .append('奈良先端科学技術大学院大学', 5) - .build(); - - -### Search - - trie.contain('a'); // -> true - - trie.lookup('abc'); // -> 2 - - trie.commonPrefixSearch('奈良先端科学技術大学院大学'); - // -> [ { v: 3, k: '奈良' }, - // { v: 4, k: '奈良先端' }, - // { v: 5, k: '奈良先端科学技術大学院大学' } ] - - -### Load - -Get BASE or CHECK buffer as Int32Array of typed array - - var base_buffer = trie.bc.getBaseBuffer(); - var check_buffer = trie.bc.getCheckBuffer(); - -Load and create a new DoubleArray object from original buffers - - var loaded_trie = doublearray.load(base_buffer, check_buffer); - - -Copyright and license ---------------------- - -Copyright (c) 2014 Takuya Asano All Rights Reserved. - -This software is released under the MIT License. -See LICENSE.txt diff --git a/node_modules/doublearray/bower.json b/node_modules/doublearray/bower.json deleted file mode 100644 index 410ac36..0000000 --- a/node_modules/doublearray/bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "doublearray", - "main": "doublearray.js", - "version": "0.0.1", - "homepage": "https://github.com/takuyaa/doublearray", - "authors": [ - "Takuya Asano " - ], - "description": "JavaScript implementation of Double-Array trie", - "keywords": [ - "trie" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/node_modules/doublearray/doublearray.js b/node_modules/doublearray/doublearray.js deleted file mode 100644 index 149ef05..0000000 --- a/node_modules/doublearray/doublearray.js +++ /dev/null @@ -1,791 +0,0 @@ -// Copyright (c) 2014 Takuya Asano All Rights Reserved. - -(function () { - - "use strict"; - - var TERM_CHAR = "\u0000", // terminal character - TERM_CODE = 0, // terminal character code - ROOT_ID = 0, // index of root node - NOT_FOUND = -1, // traverse() returns if no nodes found - BASE_SIGNED = true, - CHECK_SIGNED = true, - BASE_BYTES = 4, - CHECK_BYTES = 4, - MEMORY_EXPAND_RATIO = 2; - - - var newBC = function (initial_size) { - - if (initial_size == null) { - initial_size = 1024; - } - - var initBase = function (_base, start, end) { // 'end' index does not include - for (var i = start; i < end; i++) { - _base[i] = - i + 1; // inversed previous empty node index - } - if (0 < check.array[check.array.length - 1]) { - var last_used_id = check.array.length - 2; - while (0 < check.array[last_used_id]) { - last_used_id--; - } - _base[start] = - last_used_id; - } - }; - - var initCheck = function (_check, start, end) { - for (var i = start; i < end; i++) { - _check[i] = - i - 1; // inversed next empty node index - } - }; - - var realloc = function (min_size) { - // expand arrays size by given ratio - var new_size = min_size * MEMORY_EXPAND_RATIO; - // console.log('re-allocate memory to ' + new_size); - - var base_new_array = newArrayBuffer(base.signed, base.bytes, new_size); - initBase(base_new_array, base.array.length, new_size); // init BASE in new range - base_new_array.set(base.array); - base.array = null; // explicit GC - base.array = base_new_array; - - var check_new_array = newArrayBuffer(check.signed, check.bytes, new_size); - initCheck(check_new_array, check.array.length, new_size); // init CHECK in new range - check_new_array.set(check.array); - check.array = null; // explicit GC - check.array = check_new_array; - }; - - var first_unused_node = ROOT_ID + 1; - - var base = { - signed: BASE_SIGNED, - bytes: BASE_BYTES, - array: newArrayBuffer(BASE_SIGNED, BASE_BYTES, initial_size) - }; - - var check = { - signed: CHECK_SIGNED, - bytes: CHECK_BYTES, - array: newArrayBuffer(CHECK_SIGNED, CHECK_BYTES, initial_size) - }; - - // init root node - base.array[ROOT_ID] = 1; - check.array[ROOT_ID] = ROOT_ID; - - // init BASE - initBase(base.array, ROOT_ID + 1, base.array.length); - - // init CHECK - initCheck(check.array, ROOT_ID + 1, check.array.length); - - return { - getBaseBuffer: function () { - return base.array; - }, - getCheckBuffer: function () { - return check.array; - }, - loadBaseBuffer: function (base_buffer) { - base.array = base_buffer; - return this; - }, - loadCheckBuffer: function (check_buffer) { - check.array = check_buffer; - return this; - }, - size: function () { - return Math.max(base.array.length, check.array.length); - }, - getBase: function (index) { - if (base.array.length - 1 < index) { - return - index + 1; - // realloc(index); - } - // if (!Number.isFinite(base.array[index])) { - // console.log('getBase:' + index); - // throw 'getBase' + index; - // } - return base.array[index]; - }, - getCheck: function (index) { - if (check.array.length - 1 < index) { - return - index - 1; - // realloc(index); - } - // if (!Number.isFinite(check.array[index])) { - // console.log('getCheck:' + index); - // throw 'getCheck' + index; - // } - return check.array[index]; - }, - setBase: function (index, base_value) { - if (base.array.length - 1 < index) { - realloc(index); - } - base.array[index] = base_value; - }, - setCheck: function (index, check_value) { - if (check.array.length - 1 < index) { - realloc(index); - } - check.array[index] = check_value; - }, - setFirstUnusedNode: function (index) { - // if (!Number.isFinite(index)) { - // throw 'assertion error: setFirstUnusedNode ' + index + ' is not finite number'; - // } - first_unused_node = index; - }, - getFirstUnusedNode: function () { - // if (!Number.isFinite(first_unused_node)) { - // throw 'assertion error: getFirstUnusedNode ' + first_unused_node + ' is not finite number'; - // } - return first_unused_node; - }, - shrink: function () { - var last_index = this.size() - 1; - while (true) { - if (0 <= check.array[last_index]) { - break; - } - last_index--; - } - base.array = base.array.subarray(0, last_index + 2); // keep last unused node - check.array = check.array.subarray(0, last_index + 2); // keep last unused node - }, - calc: function () { - var unused_count = 0; - var size = check.array.length; - for (var i = 0; i < size; i++) { - if (check.array[i] < 0) { - unused_count++; - } - } - return { - all: size, - unused: unused_count, - efficiency: (size - unused_count) / size - }; - }, - dump: function () { - // for debug - var dump_base = ""; - var dump_check = ""; - - var i; - for (i = 0; i < base.array.length; i++) { - dump_base = dump_base + " " + this.getBase(i); - } - for (i = 0; i < check.array.length; i++) { - dump_check = dump_check + " " + this.getCheck(i); - } - - console.log("base:" + dump_base); - console.log("chck:" + dump_check); - - return "base:" + dump_base + " chck:" + dump_check; - } - }; - }; - - - /** - * Factory method of double array - */ - function DoubleArrayBuilder(initial_size) { - this.bc = newBC(initial_size); // BASE and CHECK - this.keys = []; - } - - - /** - * Append a key to initialize set - * (This method should be called by dictionary ordered key) - * - * @param {String} key - * @param {Number} value Integer value from 0 to max signed integer number - 1 - */ - DoubleArrayBuilder.prototype.append = function (key, record) { - this.keys.push({ k: key, v: record }); - return this; - }; - - /** - * Build double array for given keys - * - * @param {Array} keys Array of keys. A key is a Object which has properties 'k', 'v'. - * 'k' is a key string, 'v' is a record assigned to that key. - * @return {DoubleArray} Compiled double array - */ - DoubleArrayBuilder.prototype.build = function (keys, sorted) { - - if (keys == null) { - keys = this.keys; - } - - if (keys == null) { - return new DoubleArray(this.bc); - } - - if (sorted == null) { - sorted = false; - } - - // Convert key string to ArrayBuffer - var buff_keys = - keys.map(function (k) { - return { - k: stringToUtf8Bytes(k.k + TERM_CHAR), - v: k.v - }; - }); - - // Sort keys by byte order - if (sorted) { - this.keys = buff_keys; - } else { - this.keys = - buff_keys.sort(function (k1, k2) { - var b1 = k1.k; - var b2 = k2.k; - var min_length = Math.min(b1.length, b2.length); - for (var pos = 0; pos < min_length; pos++) { - if (b1[pos] === b2[pos]) { - continue; - } - return b1[pos] - b2[pos]; - } - return b1.length - b2.length; - }); - } - - buff_keys = null; // explicit GC - - this._build(ROOT_ID, 0, 0, this.keys.length); - return new DoubleArray(this.bc); - }; - - /** - * Append nodes to BASE and CHECK array recursively - */ - DoubleArrayBuilder.prototype._build = function (parent_index, position, start, length) { - - var children_info = this.getChildrenInfo(position, start, length); - var _base = this.findAllocatableBase(children_info); - - this.setBC(parent_index, children_info, _base); - - for (var i = 0; i < children_info.length; i = i + 3) { - var child_code = children_info[i]; - if (child_code === TERM_CODE) { - continue; - } - var child_start = children_info[i + 1]; - var child_len = children_info[i + 2]; - var child_index = _base + child_code; - this._build(child_index, position + 1, child_start, child_len); - } - }; - - DoubleArrayBuilder.prototype.getChildrenInfo = function (position, start, length) { - var current_char = this.keys[start].k[position]; - var i = 0; - var children_info = new Int32Array(length * 3); - - children_info[i++] = current_char; // char (current) - children_info[i++] = start; // start index (current) - - var next_pos = start; - var start_pos = start; - for (; next_pos < start + length; next_pos++) { - var next_char = this.keys[next_pos].k[position]; - if (current_char !== next_char) { - children_info[i++] = next_pos - start_pos; // length (current) - - children_info[i++] = next_char; // char (next) - children_info[i++] = next_pos; // start index (next) - current_char = next_char; - start_pos = next_pos; - } - } - children_info[i++] = next_pos - start_pos; - children_info = children_info.subarray(0, i); - - return children_info; - }; - - DoubleArrayBuilder.prototype.setBC = function (parent_id, children_info, _base) { - - var bc = this.bc; - - bc.setBase(parent_id, _base); // Update BASE of parent node - - var i; - for (i = 0; i < children_info.length; i = i + 3) { - var code = children_info[i]; - var child_id = _base + code; - - // Update linked list of unused nodes - - // Assertion - // if (child_id < 0) { - // throw 'assertion error: child_id is negative' - // } - - var prev_unused_id = - bc.getBase(child_id); - var next_unused_id = - bc.getCheck(child_id); - // if (prev_unused_id < 0) { - // throw 'assertion error: setBC' - // } - // if (next_unused_id < 0) { - // throw 'assertion error: setBC' - // } - if (child_id !== bc.getFirstUnusedNode()) { - bc.setCheck(prev_unused_id, - next_unused_id); - } else { - // Update first_unused_node - bc.setFirstUnusedNode(next_unused_id); - } - bc.setBase(next_unused_id, - prev_unused_id); - - var check = parent_id; // CHECK is parent node index - bc.setCheck(child_id, check); // Update CHECK of child node - - // Update record - if (code === TERM_CODE) { - var start_pos = children_info[i + 1]; - // var len = children_info[i + 2]; - // if (len != 1) { - // throw 'assertion error: there are multiple terminal nodes. len:' + len; - // } - var value = this.keys[start_pos].v; - - if (value == null) { - value = 0; - } - - var base = - value - 1; // BASE is inverted record value - bc.setBase(child_id, base); // Update BASE of child(leaf) node - } - } - }; - - - /** - * Find BASE value that all children are allocatable in double array's region - */ - DoubleArrayBuilder.prototype.findAllocatableBase = function (children_info) { - - var bc = this.bc; - - // Assertion: keys are sorted by byte order - // var c = -1; - // for (var i = 0; i < children_info.length; i = i + 3) { - // if (children_info[i] < c) { - // throw 'assertion error: not sort key' - // } - // c = children_info[i]; - // } - - // iterate linked list of unused nodes - var _base; - var curr = bc.getFirstUnusedNode(); // current index - // if (curr < 0) { - // throw 'assertion error: getFirstUnusedNode returns negative value' - // } - - while (true) { - _base = curr - children_info[0]; - - if (_base < 0) { - curr = - bc.getCheck(curr); // next - - // if (curr < 0) { - // throw 'assertion error: getCheck returns negative value' - // } - - continue; - } - - var empty_area_found = true; - for (var i = 0; i < children_info.length; i = i + 3) { - var code = children_info[i]; - var candidate_id = _base + code; - - if (!this.isUnusedNode(candidate_id)) { - // candidate_id is used node - // next - curr = - bc.getCheck(curr); - // if (curr < 0) { - // throw 'assertion error: getCheck returns negative value' - // } - - empty_area_found = false; - break; - } - } - if (empty_area_found) { - // Area is free - return _base; - } - } - }; - - /** - * Check this double array index is unused or not - */ - DoubleArrayBuilder.prototype.isUnusedNode = function (index) { - var bc = this.bc; - var check = bc.getCheck(index); - - // if (index < 0) { - // throw 'assertion error: isUnusedNode index:' + index; - // } - - if (index === ROOT_ID) { - // root node - return false; - } - if (check < 0) { - // unused - return true; - } - - // used node (incl. leaf) - return false; - }; - - - /** - * Factory method of double array - */ - function DoubleArray(bc) { - this.bc = bc; // BASE and CHECK - this.bc.shrink(); - } - - - /** - * Look up a given key in this trie - * - * @param {String} key - * @return {Boolean} True if this trie contains a given key - */ - DoubleArray.prototype.contain = function (key) { - - var bc = this.bc; - - key += TERM_CHAR; - var buffer = stringToUtf8Bytes(key); - - var parent = ROOT_ID; - var child = NOT_FOUND; - - for (var i = 0; i < buffer.length; i++) { - var code = buffer[i]; - - child = this.traverse(parent, code); - if (child === NOT_FOUND) { - return false; - } - - if (bc.getBase(child) <= 0) { - // leaf node - return true; - } else { - // not leaf - parent = child; - continue; - } - } - return false; - }; - - - /** - * Look up a given key in this trie - * - * @param {String} key - * @return {Number} Record value assgned to this key, -1 if this key does not contain - */ - DoubleArray.prototype.lookup = function (key) { - - key += TERM_CHAR; - var buffer = stringToUtf8Bytes(key); - - var parent = ROOT_ID; - var child = NOT_FOUND; - - for (var i = 0; i < buffer.length; i++) { - var code = buffer[i]; - child = this.traverse(parent, code); - if (child === NOT_FOUND) { - return NOT_FOUND; - } - parent = child; - } - - var base = this.bc.getBase(child); - if (base <= 0) { - // leaf node - return - base - 1; - } else { - // not leaf - return NOT_FOUND; - } - }; - - - /** - * Common prefix search - * - * @param {String} key - * @return {Array} Each result object has 'k' and 'v' (key and record, - * respectively) properties assigned to matched string - */ - DoubleArray.prototype.commonPrefixSearch = function (key) { - - var buffer = stringToUtf8Bytes(key); - - var parent = ROOT_ID; - var child = NOT_FOUND; - - var result = []; - - for (var i = 0; i < buffer.length; i++) { - var code = buffer[i]; - - child = this.traverse(parent, code); - - if (child !== NOT_FOUND) { - parent = child; - - // look forward by terminal character code to check this node is a leaf or not - var grand_child = this.traverse(child, TERM_CODE); - - if (grand_child !== NOT_FOUND) { - var base = this.bc.getBase(grand_child); - - var r = {}; - - if (base <= 0) { - // If child is a leaf node, add record to result - r.v = - base - 1; - } - - // If child is a leaf node, add word to result - r.k = utf8BytesToString(arrayCopy(buffer, 0, i + 1)); - - result.push(r); - } - continue; - } else { - break; - } - } - - return result; - }; - - DoubleArray.prototype.traverse = function (parent, code) { - var child = this.bc.getBase(parent) + code; - if (this.bc.getCheck(child) === parent) { - return child; - } else { - return NOT_FOUND; - } - }; - - DoubleArray.prototype.size = function () { - return this.bc.size(); - }; - - DoubleArray.prototype.calc = function () { - return this.bc.calc(); - }; - - DoubleArray.prototype.dump = function () { - return this.bc.dump(); - }; - - - // Array utility functions - - var newArrayBuffer = function (signed, bytes, size) { - if (signed) { - switch(bytes) { - case 1: - return new Int8Array(size); - case 2: - return new Int16Array(size); - case 4: - return new Int32Array(size); - default: - throw new RangeError("Invalid newArray parameter element_bytes:" + bytes); - } - } else { - switch(bytes) { - case 1: - return new Uint8Array(size); - case 2: - return new Uint16Array(size); - case 4: - return new Uint32Array(size); - default: - throw new RangeError("Invalid newArray parameter element_bytes:" + bytes); - } - } - }; - - var arrayCopy = function (src, src_offset, length) { - var buffer = new ArrayBuffer(length); - var dstU8 = new Uint8Array(buffer, 0, length); - var srcU8 = src.subarray(src_offset, length); - dstU8.set(srcU8); - return dstU8; - }; - - - /** - * Convert String (UTF-16) to UTF-8 ArrayBuffer - * - * @param {String} str UTF-16 string to convert - * @return {Uint8Array} Byte sequence encoded by UTF-8 - */ - var stringToUtf8Bytes = function (str) { - - // Max size of 1 character is 4 bytes - var bytes = new Uint8Array(new ArrayBuffer(str.length * 4)); - - var i = 0, j = 0; - - while (i < str.length) { - var unicode_code; - - var utf16_code = str.charCodeAt(i++); - if (utf16_code >= 0xD800 && utf16_code <= 0xDBFF) { - // surrogate pair - var upper = utf16_code; // high surrogate - var lower = str.charCodeAt(i++); // low surrogate - - if (lower >= 0xDC00 && lower <= 0xDFFF) { - unicode_code = - (upper - 0xD800) * (1 << 10) + (1 << 16) + - (lower - 0xDC00); - } else { - // malformed surrogate pair - return null; - } - } else { - // not surrogate code - unicode_code = utf16_code; - } - - if (unicode_code < 0x80) { - // 1-byte - bytes[j++] = unicode_code; - - } else if (unicode_code < (1 << 11)) { - // 2-byte - bytes[j++] = (unicode_code >>> 6) | 0xC0; - bytes[j++] = (unicode_code & 0x3F) | 0x80; - - } else if (unicode_code < (1 << 16)) { - // 3-byte - bytes[j++] = (unicode_code >>> 12) | 0xE0; - bytes[j++] = ((unicode_code >> 6) & 0x3f) | 0x80; - bytes[j++] = (unicode_code & 0x3F) | 0x80; - - } else if (unicode_code < (1 << 21)) { - // 4-byte - bytes[j++] = (unicode_code >>> 18) | 0xF0; - bytes[j++] = ((unicode_code >> 12) & 0x3F) | 0x80; - bytes[j++] = ((unicode_code >> 6) & 0x3F) | 0x80; - bytes[j++] = (unicode_code & 0x3F) | 0x80; - - } else { - // malformed UCS4 code - } - } - - return bytes.subarray(0, j); - }; - - - /** - * Convert UTF-8 ArrayBuffer to String (UTF-16) - * - * @param {Uint8Array} bytes UTF-8 byte sequence to convert - * @return {String} String encoded by UTF-16 - */ - var utf8BytesToString = function (bytes) { - - var str = ""; - var code, b1, b2, b3, b4, upper, lower; - var i = 0; - - while (i < bytes.length) { - - b1 = bytes[i++]; - - if (b1 < 0x80) { - // 1 byte - code = b1; - } else if ((b1 >> 5) === 0x06) { - // 2 bytes - b2 = bytes[i++]; - code = ((b1 & 0x1f) << 6) | (b2 & 0x3f); - } else if ((b1 >> 4) === 0x0e) { - // 3 bytes - b2 = bytes[i++]; - b3 = bytes[i++]; - code = ((b1 & 0x0f) << 12) | ((b2 & 0x3f) << 6) | (b3 & 0x3f); - } else { - // 4 bytes - b2 = bytes[i++]; - b3 = bytes[i++]; - b4 = bytes[i++]; - code = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 6) | (b4 & 0x3f); - } - - if (code < 0x10000) { - str += String.fromCharCode(code); - } else { - // surrogate pair - code -= 0x10000; - upper = (0xD800 | (code >> 10)); - lower = (0xDC00 | (code & 0x3FF)); - str += String.fromCharCode(upper, lower); - } - } - - return str; - }; - - - // public methods - var doublearray = { - builder: function (initial_size) { - return new DoubleArrayBuilder(initial_size); - }, - load: function (base_buffer, check_buffer) { - var bc = newBC(0); - bc.loadBaseBuffer(base_buffer); - bc.loadCheckBuffer(check_buffer); - return new DoubleArray(bc); - } - }; - - if ("undefined" === typeof module) { - // In browser - window.doublearray = doublearray; - } else { - // In node - module.exports = doublearray; - } - -})(); diff --git a/node_modules/doublearray/package.json b/node_modules/doublearray/package.json deleted file mode 100644 index e3bfba6..0000000 --- a/node_modules/doublearray/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "doublearray", - "version": "0.0.2", - "description": "JavaScript implementation of Double-Array trie", - "main": "doublearray.js", - "repository": { - "type": "git", - "url": "https://github.com/takuyaa/doublearray.git" - }, - "keywords": [ - "trie" - ], - "author": "takuyaa", - "license": "MIT", - "bugs": { - "url": "https://github.com/takuyaa/doublearray/issues" - }, - "homepage": "https://github.com/takuyaa/doublearray" -} diff --git a/node_modules/doublearray/test/doublearray.html b/node_modules/doublearray/test/doublearray.html deleted file mode 100644 index 34c1ce4..0000000 --- a/node_modules/doublearray/test/doublearray.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - -

doublearray.js

- -
- - - - - - - - - - - - - - diff --git a/node_modules/doublearray/test/doublearray.js b/node_modules/doublearray/test/doublearray.js deleted file mode 100644 index 383e7c8..0000000 --- a/node_modules/doublearray/test/doublearray.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2014 Takuya Asano All Rights Reserved. - -describe("doublearray", function () { - before(function(done) { - done(); - }); - describe("contain", function () { - var trie; // target - var dict = { - "apple": 1, - "ball": 2, - "bear": 3, - "bird": 4, - "bison": 5, - "black": 6, - "blue": 7, - "blur": 8, - "cold": 10, - "column": 11, - "cow": 12 - } - var words = [] - for (var key in dict) { - words.push({ k: key, v: dict[key]}) - } - it("Contain bird", function () { - trie = doublearray.builder().build(words); - expect(trie.contain("bird")).to.be.true; - }); - it("Contain bison", function () { - trie = doublearray.builder().build(words); - expect(trie.contain("bison")).to.be.true; - }); - it("Lookup bird", function () { - trie = doublearray.builder().build(words); - expect(trie.lookup("bird")).to.be.eql(dict["bird"]); - }); - it("Lookup bison", function () { - trie = doublearray.builder().build(words); - expect(trie.lookup("bison")).to.be.eql(dict["bison"]); - }); - it("Build", function () { - trie = doublearray.builder(4).build(words); - // trie.bc. - expect(trie.lookup("bison")).to.be.eql(dict["bison"]); - }); - }); - describe("load", function () { - var trie; // target - var load_trie; // target - var words = [ { k: "apple", v: 1 } ]; // test data - beforeEach(function (done) { - // Build original - trie = doublearray.builder().build(words); - - // Load from original typed array - var base_buffer = trie.bc.getBaseBuffer(); - var check_buffer = trie.bc.getCheckBuffer(); - load_trie = doublearray.load(base_buffer, check_buffer); - - done(); - }); - it("Original and loaded tries lookup successfully", function () { - expect(trie.lookup("apple")).to.be.eql(words[0].v); - expect(load_trie.lookup("apple")).to.be.eql(words[0].v); - }); - it("Original and loaded typed arrays are same", function () { - expect(trie.bc.getBaseBuffer()).to.deep.eql(load_trie.bc.getBaseBuffer()); - expect(trie.bc.getCheckBuffer()).to.deep.eql(load_trie.bc.getCheckBuffer()); - }); - }); -}); diff --git a/node_modules/doublearray/test/libs/chai.js b/node_modules/doublearray/test/libs/chai.js deleted file mode 100644 index 8a6339a..0000000 --- a/node_modules/doublearray/test/libs/chai.js +++ /dev/null @@ -1,4696 +0,0 @@ -;(function(){ - -/** - * Require the given path. - * - * @param {String} path - * @return {Object} exports - * @api public - */ - -function require(path, parent, orig) { - var resolved = require.resolve(path); - - // lookup failed - if (null == resolved) { - orig = orig || path; - parent = parent || 'root'; - var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); - err.path = orig; - err.parent = parent; - err.require = true; - throw err; - } - - var module = require.modules[resolved]; - - // perform real require() - // by invoking the module's - // registered function - if (!module._resolving && !module.exports) { - var mod = {}; - mod.exports = {}; - mod.client = mod.component = true; - module._resolving = true; - module.call(this, mod.exports, require.relative(resolved), mod); - delete module._resolving; - module.exports = mod.exports; - } - - return module.exports; -} - -/** - * Registered modules. - */ - -require.modules = {}; - -/** - * Registered aliases. - */ - -require.aliases = {}; - -/** - * Resolve `path`. - * - * Lookup: - * - * - PATH/index.js - * - PATH.js - * - PATH - * - * @param {String} path - * @return {String} path or null - * @api private - */ - -require.resolve = function(path) { - if (path.charAt(0) === '/') path = path.slice(1); - - var paths = [ - path, - path + '.js', - path + '.json', - path + '/index.js', - path + '/index.json' - ]; - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - if (require.modules.hasOwnProperty(path)) return path; - if (require.aliases.hasOwnProperty(path)) return require.aliases[path]; - } -}; - -/** - * Normalize `path` relative to the current path. - * - * @param {String} curr - * @param {String} path - * @return {String} - * @api private - */ - -require.normalize = function(curr, path) { - var segs = []; - - if ('.' != path.charAt(0)) return path; - - curr = curr.split('/'); - path = path.split('/'); - - for (var i = 0; i < path.length; ++i) { - if ('..' == path[i]) { - curr.pop(); - } else if ('.' != path[i] && '' != path[i]) { - segs.push(path[i]); - } - } - - return curr.concat(segs).join('/'); -}; - -/** - * Register module at `path` with callback `definition`. - * - * @param {String} path - * @param {Function} definition - * @api private - */ - -require.register = function(path, definition) { - require.modules[path] = definition; -}; - -/** - * Alias a module definition. - * - * @param {String} from - * @param {String} to - * @api private - */ - -require.alias = function(from, to) { - if (!require.modules.hasOwnProperty(from)) { - throw new Error('Failed to alias "' + from + '", it does not exist'); - } - require.aliases[to] = from; -}; - -/** - * Return a require function relative to the `parent` path. - * - * @param {String} parent - * @return {Function} - * @api private - */ - -require.relative = function(parent) { - var p = require.normalize(parent, '..'); - - /** - * lastIndexOf helper. - */ - - function lastIndexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; - } - return -1; - } - - /** - * The relative require() itself. - */ - - function localRequire(path) { - var resolved = localRequire.resolve(path); - return require(resolved, parent, path); - } - - /** - * Resolve relative to the parent. - */ - - localRequire.resolve = function(path) { - var c = path.charAt(0); - if ('/' == c) return path.slice(1); - if ('.' == c) return require.normalize(p, path); - - // resolve deps by returning - // the dep in the nearest "deps" - // directory - var segs = parent.split('/'); - var i = lastIndexOf(segs, 'deps') + 1; - if (!i) i = 0; - path = segs.slice(0, i + 1).join('/') + '/deps/' + path; - return path; - }; - - /** - * Check if module is defined at `path`. - */ - - localRequire.exists = function(path) { - return require.modules.hasOwnProperty(localRequire.resolve(path)); - }; - - return localRequire; -}; -require.register("chaijs-assertion-error/index.js", function(exports, require, module){ -/*! - * assertion-error - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Return a function that will copy properties from - * one object to another excluding any originally - * listed. Returned function will create a new `{}`. - * - * @param {String} excluded properties ... - * @return {Function} - */ - -function exclude () { - var excludes = [].slice.call(arguments); - - function excludeProps (res, obj) { - Object.keys(obj).forEach(function (key) { - if (!~excludes.indexOf(key)) res[key] = obj[key]; - }); - } - - return function extendExclude () { - var args = [].slice.call(arguments) - , i = 0 - , res = {}; - - for (; i < args.length; i++) { - excludeProps(res, args[i]); - } - - return res; - }; -}; - -/*! - * Primary Exports - */ - -module.exports = AssertionError; - -/** - * ### AssertionError - * - * An extension of the JavaScript `Error` constructor for - * assertion and validation scenarios. - * - * @param {String} message - * @param {Object} properties to include (optional) - * @param {callee} start stack function (optional) - */ - -function AssertionError (message, _props, ssf) { - var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') - , props = extend(_props || {}); - - // default values - this.message = message || 'Unspecified AssertionError'; - this.showDiff = false; - - // copy from properties - for (var key in props) { - this[key] = props[key]; - } - - // capture stack trace - ssf = ssf || arguments.callee; - if (ssf && Error.captureStackTrace) { - Error.captureStackTrace(this, ssf); - } -} - -/*! - * Inherit from Error.prototype - */ - -AssertionError.prototype = Object.create(Error.prototype); - -/*! - * Statically set name - */ - -AssertionError.prototype.name = 'AssertionError'; - -/*! - * Ensure correct constructor - */ - -AssertionError.prototype.constructor = AssertionError; - -/** - * Allow errors to be converted to JSON for static transfer. - * - * @param {Boolean} include stack (default: `true`) - * @return {Object} object that can be `JSON.stringify` - */ - -AssertionError.prototype.toJSON = function (stack) { - var extend = exclude('constructor', 'toJSON', 'stack') - , props = extend({ name: this.name }, this); - - // include stack if exists and not turned off - if (false !== stack && this.stack) { - props.stack = this.stack; - } - - return props; -}; - -}); -require.register("chaijs-type-detect/lib/type.js", function(exports, require, module){ -/*! - * type-detect - * Copyright(c) 2013 jake luer - * MIT Licensed - */ - -/*! - * Primary Exports - */ - -var exports = module.exports = getType; - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Array]': 'array' - , '[object RegExp]': 'regexp' - , '[object Function]': 'function' - , '[object Arguments]': 'arguments' - , '[object Date]': 'date' -}; - -/** - * ### typeOf (obj) - * - * Use several different techniques to determine - * the type of object being tested. - * - * - * @param {Mixed} object - * @return {String} object type - * @api public - */ - -function getType (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -} - -exports.Library = Library; - -/** - * ### Library - * - * Create a repository for custom type detection. - * - * ```js - * var lib = new type.Library; - * ``` - * - */ - -function Library () { - this.tests = {}; -} - -/** - * #### .of (obj) - * - * Expose replacement `typeof` detection to the library. - * - * ```js - * if ('string' === lib.of('hello world')) { - * // ... - * } - * ``` - * - * @param {Mixed} object to test - * @return {String} type - */ - -Library.prototype.of = getType; - -/** - * #### .define (type, test) - * - * Add a test to for the `.test()` assertion. - * - * Can be defined as a regular expression: - * - * ```js - * lib.define('int', /^[0-9]+$/); - * ``` - * - * ... or as a function: - * - * ```js - * lib.define('bln', function (obj) { - * if ('boolean' === lib.of(obj)) return true; - * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; - * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); - * return !! ~blns.indexOf(obj); - * }); - * ``` - * - * @param {String} type - * @param {RegExp|Function} test - * @api public - */ - -Library.prototype.define = function (type, test) { - if (arguments.length === 1) return this.tests[type]; - this.tests[type] = test; - return this; -}; - -/** - * #### .test (obj, test) - * - * Assert that an object is of type. Will first - * check natives, and if that does not pass it will - * use the user defined custom tests. - * - * ```js - * assert(lib.test('1', 'int')); - * assert(lib.test('yes', 'bln')); - * ``` - * - * @param {Mixed} object - * @param {String} type - * @return {Boolean} result - * @api public - */ - -Library.prototype.test = function (obj, type) { - if (type === getType(obj)) return true; - var test = this.tests[type]; - - if (test && 'regexp' === getType(test)) { - return test.test(obj); - } else if (test && 'function' === getType(test)) { - return test(obj); - } else { - throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); - } -}; - -}); -require.register("chaijs-deep-eql/lib/eql.js", function(exports, require, module){ -/*! - * deep-eql - * Copyright(c) 2013 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var type = require('type-detect'); - -/*! - * Buffer.isBuffer browser shim - */ - -var Buffer; -try { Buffer = require('buffer').Buffer; } -catch(ex) { - Buffer = {}; - Buffer.isBuffer = function() { return false; } -} - -/*! - * Primary Export - */ - -module.exports = deepEqual; - -/** - * Assert super-strict (egal) equality between - * two objects of any type. - * - * @param {Mixed} a - * @param {Mixed} b - * @param {Array} memoised (optional) - * @return {Boolean} equal match - */ - -function deepEqual(a, b, m) { - if (sameValue(a, b)) { - return true; - } else if ('date' === type(a)) { - return dateEqual(a, b); - } else if ('regexp' === type(a)) { - return regexpEqual(a, b); - } else if (Buffer.isBuffer(a)) { - return bufferEqual(a, b); - } else if ('arguments' === type(a)) { - return argumentsEqual(a, b, m); - } else if (!typeEqual(a, b)) { - return false; - } else if (('object' !== type(a) && 'object' !== type(b)) - && ('array' !== type(a) && 'array' !== type(b))) { - return sameValue(a, b); - } else { - return objectEqual(a, b, m); - } -} - -/*! - * Strict (egal) equality test. Ensures that NaN always - * equals NaN and `-0` does not equal `+0`. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} equal match - */ - -function sameValue(a, b) { - if (a === b) return a !== 0 || 1 / a === 1 / b; - return a !== a && b !== b; -} - -/*! - * Compare the types of two given objects and - * return if they are equal. Note that an Array - * has a type of `array` (not `object`) and arguments - * have a type of `arguments` (not `array`/`object`). - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function typeEqual(a, b) { - return type(a) === type(b); -} - -/*! - * Compare two Date objects by asserting that - * the time values are equal using `saveValue`. - * - * @param {Date} a - * @param {Date} b - * @return {Boolean} result - */ - -function dateEqual(a, b) { - if ('date' !== type(b)) return false; - return sameValue(a.getTime(), b.getTime()); -} - -/*! - * Compare two regular expressions by converting them - * to string and checking for `sameValue`. - * - * @param {RegExp} a - * @param {RegExp} b - * @return {Boolean} result - */ - -function regexpEqual(a, b) { - if ('regexp' !== type(b)) return false; - return sameValue(a.toString(), b.toString()); -} - -/*! - * Assert deep equality of two `arguments` objects. - * Unfortunately, these must be sliced to arrays - * prior to test to ensure no bad behavior. - * - * @param {Arguments} a - * @param {Arguments} b - * @param {Array} memoize (optional) - * @return {Boolean} result - */ - -function argumentsEqual(a, b, m) { - if ('arguments' !== type(b)) return false; - a = [].slice.call(a); - b = [].slice.call(b); - return deepEqual(a, b, m); -} - -/*! - * Get enumerable properties of a given object. - * - * @param {Object} a - * @return {Array} property names - */ - -function enumerable(a) { - var res = []; - for (var key in a) res.push(key); - return res; -} - -/*! - * Simple equality for flat iterable objects - * such as Arrays or Node.js buffers. - * - * @param {Iterable} a - * @param {Iterable} b - * @return {Boolean} result - */ - -function iterableEqual(a, b) { - if (a.length !== b.length) return false; - - var i = 0; - var match = true; - - for (; i < a.length; i++) { - if (a[i] !== b[i]) { - match = false; - break; - } - } - - return match; -} - -/*! - * Extension to `iterableEqual` specifically - * for Node.js Buffers. - * - * @param {Buffer} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function bufferEqual(a, b) { - if (!Buffer.isBuffer(b)) return false; - return iterableEqual(a, b); -} - -/*! - * Block for `objectEqual` ensuring non-existing - * values don't get in. - * - * @param {Mixed} object - * @return {Boolean} result - */ - -function isValue(a) { - return a !== null && a !== undefined; -} - -/*! - * Recursively check the equality of two objects. - * Once basic sameness has been established it will - * defer to `deepEqual` for each enumerable key - * in the object. - * - * @param {Mixed} a - * @param {Mixed} b - * @return {Boolean} result - */ - -function objectEqual(a, b, m) { - if (!isValue(a) || !isValue(b)) { - return false; - } - - if (a.prototype !== b.prototype) { - return false; - } - - var i; - if (m) { - for (i = 0; i < m.length; i++) { - if ((m[i][0] === a && m[i][1] === b) - || (m[i][0] === b && m[i][1] === a)) { - return true; - } - } - } else { - m = []; - } - - try { - var ka = enumerable(a); - var kb = enumerable(b); - } catch (ex) { - return false; - } - - ka.sort(); - kb.sort(); - - if (!iterableEqual(ka, kb)) { - return false; - } - - m.push([ a, b ]); - - var key; - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], m)) { - return false; - } - } - - return true; -} - -}); -require.register("chai/index.js", function(exports, require, module){ -module.exports = require('./lib/chai'); - -}); -require.register("chai/lib/chai.js", function(exports, require, module){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -var used = [] - , exports = module.exports = {}; - -/*! - * Chai version - */ - -exports.version = '1.8.1'; - -/*! - * Assertion Error - */ - -exports.AssertionError = require('assertion-error'); - -/*! - * Utils for plugins (not exported) - */ - -var util = require('./chai/utils'); - -/** - * # .use(function) - * - * Provides a way to extend the internals of Chai - * - * @param {Function} - * @returns {this} for chaining - * @api public - */ - -exports.use = function (fn) { - if (!~used.indexOf(fn)) { - fn(this, util); - used.push(fn); - } - - return this; -}; - -/*! - * Primary `Assertion` prototype - */ - -var assertion = require('./chai/assertion'); -exports.use(assertion); - -/*! - * Core Assertions - */ - -var core = require('./chai/core/assertions'); -exports.use(core); - -/*! - * Expect interface - */ - -var expect = require('./chai/interface/expect'); -exports.use(expect); - -/*! - * Should interface - */ - -var should = require('./chai/interface/should'); -exports.use(should); - -/*! - * Assert interface - */ - -var assert = require('./chai/interface/assert'); -exports.use(assert); - -}); -require.register("chai/lib/chai/assertion.js", function(exports, require, module){ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (_chai, util) { - /*! - * Module dependencies. - */ - - var AssertionError = _chai.AssertionError - , flag = util.flag; - - /*! - * Module export. - */ - - _chai.Assertion = Assertion; - - /*! - * Assertion Constructor - * - * Creates object for chaining. - * - * @api private - */ - - function Assertion (obj, msg, stack) { - flag(this, 'ssfi', stack || arguments.callee); - flag(this, 'object', obj); - flag(this, 'message', msg); - } - - /*! - * ### Assertion.includeStack - * - * User configurable property, influences whether stack trace - * is included in Assertion error message. Default of false - * suppresses stack trace in the error message - * - * Assertion.includeStack = true; // enable stack on error - * - * @api public - */ - - Assertion.includeStack = false; - - /*! - * ### Assertion.showDiff - * - * User configurable property, influences whether or not - * the `showDiff` flag should be included in the thrown - * AssertionErrors. `false` will always be `false`; `true` - * will be true when the assertion has requested a diff - * be shown. - * - * @api public - */ - - Assertion.showDiff = true; - - Assertion.addProperty = function (name, fn) { - util.addProperty(this.prototype, name, fn); - }; - - Assertion.addMethod = function (name, fn) { - util.addMethod(this.prototype, name, fn); - }; - - Assertion.addChainableMethod = function (name, fn, chainingBehavior) { - util.addChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - Assertion.overwriteProperty = function (name, fn) { - util.overwriteProperty(this.prototype, name, fn); - }; - - Assertion.overwriteMethod = function (name, fn) { - util.overwriteMethod(this.prototype, name, fn); - }; - - Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { - util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior); - }; - - /*! - * ### .assert(expression, message, negateMessage, expected, actual) - * - * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. - * - * @name assert - * @param {Philosophical} expression to be tested - * @param {String} message to display if fails - * @param {String} negatedMessage to display if negated expression fails - * @param {Mixed} expected value (remember to check for negation) - * @param {Mixed} actual (optional) will default to `this.obj` - * @api private - */ - - Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { - var ok = util.test(this, arguments); - if (true !== showDiff) showDiff = false; - if (true !== Assertion.showDiff) showDiff = false; - - if (!ok) { - var msg = util.getMessage(this, arguments) - , actual = util.getActual(this, arguments); - throw new AssertionError(msg, { - actual: actual - , expected: expected - , showDiff: showDiff - }, (Assertion.includeStack) ? this.assert : flag(this, 'ssfi')); - } - }; - - /*! - * ### ._obj - * - * Quick reference to stored `actual` value for plugin developers. - * - * @api private - */ - - Object.defineProperty(Assertion.prototype, '_obj', - { get: function () { - return flag(this, 'object'); - } - , set: function (val) { - flag(this, 'object', val); - } - }); -}; - -}); -require.register("chai/lib/chai/core/assertions.js", function(exports, require, module){ -/*! - * chai - * http://chaijs.com - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, _) { - var Assertion = chai.Assertion - , toString = Object.prototype.toString - , flag = _.flag; - - /** - * ### Language Chains - * - * The following are provided as chainable getters to - * improve the readability of your assertions. They - * do not provide an testing capability unless they - * have been overwritten by a plugin. - * - * **Chains** - * - * - to - * - be - * - been - * - is - * - that - * - and - * - has - * - have - * - with - * - at - * - of - * - same - * - * @name language chains - * @api public - */ - - [ 'to', 'be', 'been' - , 'is', 'and', 'has', 'have' - , 'with', 'that', 'at' - , 'of', 'same' ].forEach(function (chain) { - Assertion.addProperty(chain, function () { - return this; - }); - }); - - /** - * ### .not - * - * Negates any of assertions following in the chain. - * - * expect(foo).to.not.equal('bar'); - * expect(goodFn).to.not.throw(Error); - * expect({ foo: 'baz' }).to.have.property('foo') - * .and.not.equal('bar'); - * - * @name not - * @api public - */ - - Assertion.addProperty('not', function () { - flag(this, 'negate', true); - }); - - /** - * ### .deep - * - * Sets the `deep` flag, later used by the `equal` and - * `property` assertions. - * - * expect(foo).to.deep.equal({ bar: 'baz' }); - * expect({ foo: { bar: { baz: 'quux' } } }) - * .to.have.deep.property('foo.bar.baz', 'quux'); - * - * @name deep - * @api public - */ - - Assertion.addProperty('deep', function () { - flag(this, 'deep', true); - }); - - /** - * ### .a(type) - * - * The `a` and `an` assertions are aliases that can be - * used either as language chains or to assert a value's - * type. - * - * // typeof - * expect('test').to.be.a('string'); - * expect({ foo: 'bar' }).to.be.an('object'); - * expect(null).to.be.a('null'); - * expect(undefined).to.be.an('undefined'); - * - * // language chain - * expect(foo).to.be.an.instanceof(Foo); - * - * @name a - * @alias an - * @param {String} type - * @param {String} message _optional_ - * @api public - */ - - function an (type, msg) { - if (msg) flag(this, 'message', msg); - type = type.toLowerCase(); - var obj = flag(this, 'object') - , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; - - this.assert( - type === _.type(obj) - , 'expected #{this} to be ' + article + type - , 'expected #{this} not to be ' + article + type - ); - } - - Assertion.addChainableMethod('an', an); - Assertion.addChainableMethod('a', an); - - /** - * ### .include(value) - * - * The `include` and `contain` assertions can be used as either property - * based language chains or as methods to assert the inclusion of an object - * in an array or a substring in a string. When used as language chains, - * they toggle the `contain` flag for the `keys` assertion. - * - * expect([1,2,3]).to.include(2); - * expect('foobar').to.contain('foo'); - * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); - * - * @name include - * @alias contain - * @param {Object|String|Number} obj - * @param {String} message _optional_ - * @api public - */ - - function includeChainingBehavior () { - flag(this, 'contains', true); - } - - function include (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - if (_.type(val) === 'object') { - if (!flag(this, 'negate')) { - for (var k in val) new Assertion(obj).property(k, val[k]); - return; - } - var subset = {} - for (var k in val) subset[k] = obj[k] - var expected = _.eql(subset, val); - } else { - var expected = obj && ~obj.indexOf(val) - } - this.assert( - expected - , 'expected #{this} to include ' + _.inspect(val) - , 'expected #{this} to not include ' + _.inspect(val)); - } - - Assertion.addChainableMethod('include', include, includeChainingBehavior); - Assertion.addChainableMethod('contain', include, includeChainingBehavior); - - /** - * ### .ok - * - * Asserts that the target is truthy. - * - * expect('everthing').to.be.ok; - * expect(1).to.be.ok; - * expect(false).to.not.be.ok; - * expect(undefined).to.not.be.ok; - * expect(null).to.not.be.ok; - * - * @name ok - * @api public - */ - - Assertion.addProperty('ok', function () { - this.assert( - flag(this, 'object') - , 'expected #{this} to be truthy' - , 'expected #{this} to be falsy'); - }); - - /** - * ### .true - * - * Asserts that the target is `true`. - * - * expect(true).to.be.true; - * expect(1).to.not.be.true; - * - * @name true - * @api public - */ - - Assertion.addProperty('true', function () { - this.assert( - true === flag(this, 'object') - , 'expected #{this} to be true' - , 'expected #{this} to be false' - , this.negate ? false : true - ); - }); - - /** - * ### .false - * - * Asserts that the target is `false`. - * - * expect(false).to.be.false; - * expect(0).to.not.be.false; - * - * @name false - * @api public - */ - - Assertion.addProperty('false', function () { - this.assert( - false === flag(this, 'object') - , 'expected #{this} to be false' - , 'expected #{this} to be true' - , this.negate ? true : false - ); - }); - - /** - * ### .null - * - * Asserts that the target is `null`. - * - * expect(null).to.be.null; - * expect(undefined).not.to.be.null; - * - * @name null - * @api public - */ - - Assertion.addProperty('null', function () { - this.assert( - null === flag(this, 'object') - , 'expected #{this} to be null' - , 'expected #{this} not to be null' - ); - }); - - /** - * ### .undefined - * - * Asserts that the target is `undefined`. - * - * expect(undefined).to.be.undefined; - * expect(null).to.not.be.undefined; - * - * @name undefined - * @api public - */ - - Assertion.addProperty('undefined', function () { - this.assert( - undefined === flag(this, 'object') - , 'expected #{this} to be undefined' - , 'expected #{this} not to be undefined' - ); - }); - - /** - * ### .exist - * - * Asserts that the target is neither `null` nor `undefined`. - * - * var foo = 'hi' - * , bar = null - * , baz; - * - * expect(foo).to.exist; - * expect(bar).to.not.exist; - * expect(baz).to.not.exist; - * - * @name exist - * @api public - */ - - Assertion.addProperty('exist', function () { - this.assert( - null != flag(this, 'object') - , 'expected #{this} to exist' - , 'expected #{this} to not exist' - ); - }); - - - /** - * ### .empty - * - * Asserts that the target's length is `0`. For arrays, it checks - * the `length` property. For objects, it gets the count of - * enumerable keys. - * - * expect([]).to.be.empty; - * expect('').to.be.empty; - * expect({}).to.be.empty; - * - * @name empty - * @api public - */ - - Assertion.addProperty('empty', function () { - var obj = flag(this, 'object') - , expected = obj; - - if (Array.isArray(obj) || 'string' === typeof object) { - expected = obj.length; - } else if (typeof obj === 'object') { - expected = Object.keys(obj).length; - } - - this.assert( - !expected - , 'expected #{this} to be empty' - , 'expected #{this} not to be empty' - ); - }); - - /** - * ### .arguments - * - * Asserts that the target is an arguments object. - * - * function test () { - * expect(arguments).to.be.arguments; - * } - * - * @name arguments - * @alias Arguments - * @api public - */ - - function checkArguments () { - var obj = flag(this, 'object') - , type = Object.prototype.toString.call(obj); - this.assert( - '[object Arguments]' === type - , 'expected #{this} to be arguments but got ' + type - , 'expected #{this} to not be arguments' - ); - } - - Assertion.addProperty('arguments', checkArguments); - Assertion.addProperty('Arguments', checkArguments); - - /** - * ### .equal(value) - * - * Asserts that the target is strictly equal (`===`) to `value`. - * Alternately, if the `deep` flag is set, asserts that - * the target is deeply equal to `value`. - * - * expect('hello').to.equal('hello'); - * expect(42).to.equal(42); - * expect(1).to.not.equal(true); - * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' }); - * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' }); - * - * @name equal - * @alias equals - * @alias eq - * @alias deep.equal - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEqual (val, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'deep')) { - return this.eql(val); - } else { - this.assert( - val === obj - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{exp}' - , val - , this._obj - , true - ); - } - } - - Assertion.addMethod('equal', assertEqual); - Assertion.addMethod('equals', assertEqual); - Assertion.addMethod('eq', assertEqual); - - /** - * ### .eql(value) - * - * Asserts that the target is deeply equal to `value`. - * - * expect({ foo: 'bar' }).to.eql({ foo: 'bar' }); - * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]); - * - * @name eql - * @alias eqls - * @param {Mixed} value - * @param {String} message _optional_ - * @api public - */ - - function assertEql(obj, msg) { - if (msg) flag(this, 'message', msg); - this.assert( - _.eql(obj, flag(this, 'object')) - , 'expected #{this} to deeply equal #{exp}' - , 'expected #{this} to not deeply equal #{exp}' - , obj - , this._obj - , true - ); - } - - Assertion.addMethod('eql', assertEql); - Assertion.addMethod('eqls', assertEql); - - /** - * ### .above(value) - * - * Asserts that the target is greater than `value`. - * - * expect(10).to.be.above(5); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * - * @name above - * @alias gt - * @alias greaterThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertAbove (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len > n - , 'expected #{this} to have a length above #{exp} but got #{act}' - , 'expected #{this} to not have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj > n - , 'expected #{this} to be above ' + n - , 'expected #{this} to be at most ' + n - ); - } - } - - Assertion.addMethod('above', assertAbove); - Assertion.addMethod('gt', assertAbove); - Assertion.addMethod('greaterThan', assertAbove); - - /** - * ### .least(value) - * - * Asserts that the target is greater than or equal to `value`. - * - * expect(10).to.be.at.least(10); - * - * Can also be used in conjunction with `length` to - * assert a minimum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.least(2); - * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3); - * - * @name least - * @alias gte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertLeast (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= n - , 'expected #{this} to have a length at least #{exp} but got #{act}' - , 'expected #{this} to have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj >= n - , 'expected #{this} to be at least ' + n - , 'expected #{this} to be below ' + n - ); - } - } - - Assertion.addMethod('least', assertLeast); - Assertion.addMethod('gte', assertLeast); - - /** - * ### .below(value) - * - * Asserts that the target is less than `value`. - * - * expect(5).to.be.below(10); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * - * @name below - * @alias lt - * @alias lessThan - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertBelow (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len < n - , 'expected #{this} to have a length below #{exp} but got #{act}' - , 'expected #{this} to not have a length below #{exp}' - , n - , len - ); - } else { - this.assert( - obj < n - , 'expected #{this} to be below ' + n - , 'expected #{this} to be at least ' + n - ); - } - } - - Assertion.addMethod('below', assertBelow); - Assertion.addMethod('lt', assertBelow); - Assertion.addMethod('lessThan', assertBelow); - - /** - * ### .most(value) - * - * Asserts that the target is less than or equal to `value`. - * - * expect(5).to.be.at.most(5); - * - * Can also be used in conjunction with `length` to - * assert a maximum length. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.of.at.most(4); - * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3); - * - * @name most - * @alias lte - * @param {Number} value - * @param {String} message _optional_ - * @api public - */ - - function assertMost (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len <= n - , 'expected #{this} to have a length at most #{exp} but got #{act}' - , 'expected #{this} to have a length above #{exp}' - , n - , len - ); - } else { - this.assert( - obj <= n - , 'expected #{this} to be at most ' + n - , 'expected #{this} to be above ' + n - ); - } - } - - Assertion.addMethod('most', assertMost); - Assertion.addMethod('lte', assertMost); - - /** - * ### .within(start, finish) - * - * Asserts that the target is within a range. - * - * expect(7).to.be.within(5,10); - * - * Can also be used in conjunction with `length` to - * assert a length range. The benefit being a - * more informative error message than if the length - * was supplied directly. - * - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name within - * @param {Number} start lowerbound inclusive - * @param {Number} finish upperbound inclusive - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('within', function (start, finish, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , range = start + '..' + finish; - if (flag(this, 'doLength')) { - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - this.assert( - len >= start && len <= finish - , 'expected #{this} to have a length within ' + range - , 'expected #{this} to not have a length within ' + range - ); - } else { - this.assert( - obj >= start && obj <= finish - , 'expected #{this} to be within ' + range - , 'expected #{this} to not be within ' + range - ); - } - }); - - /** - * ### .instanceof(constructor) - * - * Asserts that the target is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , Chai = new Tea('chai'); - * - * expect(Chai).to.be.an.instanceof(Tea); - * expect([ 1, 2, 3 ]).to.be.instanceof(Array); - * - * @name instanceof - * @param {Constructor} constructor - * @param {String} message _optional_ - * @alias instanceOf - * @api public - */ - - function assertInstanceOf (constructor, msg) { - if (msg) flag(this, 'message', msg); - var name = _.getName(constructor); - this.assert( - flag(this, 'object') instanceof constructor - , 'expected #{this} to be an instance of ' + name - , 'expected #{this} to not be an instance of ' + name - ); - }; - - Assertion.addMethod('instanceof', assertInstanceOf); - Assertion.addMethod('instanceOf', assertInstanceOf); - - /** - * ### .property(name, [value]) - * - * Asserts that the target has a property `name`, optionally asserting that - * the value of that property is strictly equal to `value`. - * If the `deep` flag is set, you can use dot- and bracket-notation for deep - * references into objects and arrays. - * - * // simple referencing - * var obj = { foo: 'bar' }; - * expect(obj).to.have.property('foo'); - * expect(obj).to.have.property('foo', 'bar'); - * - * // deep referencing - * var deepObj = { - * green: { tea: 'matcha' } - * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ] - * }; - - * expect(deepObj).to.have.deep.property('green.tea', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[1]', 'matcha'); - * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha'); - * - * You can also use an array as the starting point of a `deep.property` - * assertion, or traverse nested arrays. - * - * var arr = [ - * [ 'chai', 'matcha', 'konacha' ] - * , [ { tea: 'chai' } - * , { tea: 'matcha' } - * , { tea: 'konacha' } ] - * ]; - * - * expect(arr).to.have.deep.property('[0][1]', 'matcha'); - * expect(arr).to.have.deep.property('[1][2].tea', 'konacha'); - * - * Furthermore, `property` changes the subject of the assertion - * to be the value of that property from the original object. This - * permits for further chainable assertions on that property. - * - * expect(obj).to.have.property('foo') - * .that.is.a('string'); - * expect(deepObj).to.have.property('green') - * .that.is.an('object') - * .that.deep.equals({ tea: 'matcha' }); - * expect(deepObj).to.have.property('teas') - * .that.is.an('array') - * .with.deep.property('[2]') - * .that.deep.equals({ tea: 'konacha' }); - * - * @name property - * @alias deep.property - * @param {String} name - * @param {Mixed} value (optional) - * @param {String} message _optional_ - * @returns value of property for chaining - * @api public - */ - - Assertion.addMethod('property', function (name, val, msg) { - if (msg) flag(this, 'message', msg); - - var descriptor = flag(this, 'deep') ? 'deep property ' : 'property ' - , negate = flag(this, 'negate') - , obj = flag(this, 'object') - , value = flag(this, 'deep') - ? _.getPathValue(name, obj) - : obj[name]; - - if (negate && undefined !== val) { - if (undefined === value) { - msg = (msg != null) ? msg + ': ' : ''; - throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name)); - } - } else { - this.assert( - undefined !== value - , 'expected #{this} to have a ' + descriptor + _.inspect(name) - , 'expected #{this} to not have ' + descriptor + _.inspect(name)); - } - - if (undefined !== val) { - this.assert( - val === value - , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}' - , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}' - , val - , value - ); - } - - flag(this, 'object', value); - }); - - - /** - * ### .ownProperty(name) - * - * Asserts that the target has an own property `name`. - * - * expect('test').to.have.ownProperty('length'); - * - * @name ownProperty - * @alias haveOwnProperty - * @param {String} name - * @param {String} message _optional_ - * @api public - */ - - function assertOwnProperty (name, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - obj.hasOwnProperty(name) - , 'expected #{this} to have own property ' + _.inspect(name) - , 'expected #{this} to not have own property ' + _.inspect(name) - ); - } - - Assertion.addMethod('ownProperty', assertOwnProperty); - Assertion.addMethod('haveOwnProperty', assertOwnProperty); - - /** - * ### .length(value) - * - * Asserts that the target's `length` property has - * the expected value. - * - * expect([ 1, 2, 3]).to.have.length(3); - * expect('foobar').to.have.length(6); - * - * Can also be used as a chain precursor to a value - * comparison for the length property. - * - * expect('foo').to.have.length.above(2); - * expect([ 1, 2, 3 ]).to.have.length.above(2); - * expect('foo').to.have.length.below(4); - * expect([ 1, 2, 3 ]).to.have.length.below(4); - * expect('foo').to.have.length.within(2,4); - * expect([ 1, 2, 3 ]).to.have.length.within(2,4); - * - * @name length - * @alias lengthOf - * @param {Number} length - * @param {String} message _optional_ - * @api public - */ - - function assertLengthChain () { - flag(this, 'doLength', true); - } - - function assertLength (n, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).to.have.property('length'); - var len = obj.length; - - this.assert( - len == n - , 'expected #{this} to have a length of #{exp} but got #{act}' - , 'expected #{this} to not have a length of #{act}' - , n - , len - ); - } - - Assertion.addChainableMethod('length', assertLength, assertLengthChain); - Assertion.addMethod('lengthOf', assertLength, assertLengthChain); - - /** - * ### .match(regexp) - * - * Asserts that the target matches a regular expression. - * - * expect('foobar').to.match(/^foo/); - * - * @name match - * @param {RegExp} RegularExpression - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('match', function (re, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - re.exec(obj) - , 'expected #{this} to match ' + re - , 'expected #{this} not to match ' + re - ); - }); - - /** - * ### .string(string) - * - * Asserts that the string target contains another string. - * - * expect('foobar').to.have.string('bar'); - * - * @name string - * @param {String} string - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('string', function (str, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('string'); - - this.assert( - ~obj.indexOf(str) - , 'expected #{this} to contain ' + _.inspect(str) - , 'expected #{this} to not contain ' + _.inspect(str) - ); - }); - - - /** - * ### .keys(key1, [key2], [...]) - * - * Asserts that the target has exactly the given keys, or - * asserts the inclusion of some keys when using the - * `include` or `contain` modifiers. - * - * expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']); - * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar'); - * - * @name keys - * @alias key - * @param {String...|Array} keys - * @api public - */ - - function assertKeys (keys) { - var obj = flag(this, 'object') - , str - , ok = true; - - keys = keys instanceof Array - ? keys - : Array.prototype.slice.call(arguments); - - if (!keys.length) throw new Error('keys required'); - - var actual = Object.keys(obj) - , len = keys.length; - - // Inclusion - ok = keys.every(function(key){ - return ~actual.indexOf(key); - }); - - // Strict - if (!flag(this, 'negate') && !flag(this, 'contains')) { - ok = ok && keys.length == actual.length; - } - - // Key string - if (len > 1) { - keys = keys.map(function(key){ - return _.inspect(key); - }); - var last = keys.pop(); - str = keys.join(', ') + ', and ' + last; - } else { - str = _.inspect(keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (flag(this, 'contains') ? 'contain ' : 'have ') + str; - - // Assertion - this.assert( - ok - , 'expected #{this} to ' + str - , 'expected #{this} to not ' + str - ); - } - - Assertion.addMethod('keys', assertKeys); - Assertion.addMethod('key', assertKeys); - - /** - * ### .throw(constructor) - * - * Asserts that the function target will throw a specific error, or specific type of error - * (as determined using `instanceof`), optionally with a RegExp or string inclusion test - * for the error's message. - * - * var err = new ReferenceError('This is a bad function.'); - * var fn = function () { throw err; } - * expect(fn).to.throw(ReferenceError); - * expect(fn).to.throw(Error); - * expect(fn).to.throw(/bad function/); - * expect(fn).to.not.throw('good function'); - * expect(fn).to.throw(ReferenceError, /bad function/); - * expect(fn).to.throw(err); - * expect(fn).to.not.throw(new RangeError('Out of range.')); - * - * Please note that when a throw expectation is negated, it will check each - * parameter independently, starting with error constructor type. The appropriate way - * to check for the existence of a type of error but for a message that does not match - * is to use `and`. - * - * expect(fn).to.throw(ReferenceError) - * .and.not.throw(/good function/); - * - * @name throw - * @alias throws - * @alias Throw - * @param {ErrorConstructor} constructor - * @param {String|RegExp} expected error message - * @param {String} message _optional_ - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @returns error for chaining (null if no error) - * @api public - */ - - function assertThrows (constructor, errMsg, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - new Assertion(obj, msg).is.a('function'); - - var thrown = false - , desiredError = null - , name = null - , thrownError = null; - - if (arguments.length === 0) { - errMsg = null; - constructor = null; - } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) { - errMsg = constructor; - constructor = null; - } else if (constructor && constructor instanceof Error) { - desiredError = constructor; - constructor = null; - errMsg = null; - } else if (typeof constructor === 'function') { - name = constructor.prototype.name || constructor.name; - if (name === 'Error' && constructor !== Error) { - name = (new constructor()).name; - } - } else { - constructor = null; - } - - try { - obj(); - } catch (err) { - // first, check desired error - if (desiredError) { - this.assert( - err === desiredError - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp}' - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (err instanceof Error ? err.toString() : err) - ); - - flag(this, 'object', err); - return this; - } - - // next, check constructor - if (constructor) { - this.assert( - err instanceof constructor - , 'expected #{this} to throw #{exp} but #{act} was thrown' - , 'expected #{this} to not throw #{exp} but #{act} was thrown' - , name - , (err instanceof Error ? err.toString() : err) - ); - - if (!errMsg) { - flag(this, 'object', err); - return this; - } - } - - // next, check message - var message = 'object' === _.type(err) && "message" in err - ? err.message - : '' + err; - - if ((message != null) && errMsg && errMsg instanceof RegExp) { - this.assert( - errMsg.exec(message) - , 'expected #{this} to throw error matching #{exp} but got #{act}' - , 'expected #{this} to throw error not matching #{exp}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else if ((message != null) && errMsg && 'string' === typeof errMsg) { - this.assert( - ~message.indexOf(errMsg) - , 'expected #{this} to throw error including #{exp} but got #{act}' - , 'expected #{this} to throw error not including #{act}' - , errMsg - , message - ); - - flag(this, 'object', err); - return this; - } else { - thrown = true; - thrownError = err; - } - } - - var actuallyGot = '' - , expectedThrown = name !== null - ? name - : desiredError - ? '#{exp}' //_.inspect(desiredError) - : 'an error'; - - if (thrown) { - actuallyGot = ' but #{act} was thrown' - } - - this.assert( - thrown === true - , 'expected #{this} to throw ' + expectedThrown + actuallyGot - , 'expected #{this} to not throw ' + expectedThrown + actuallyGot - , (desiredError instanceof Error ? desiredError.toString() : desiredError) - , (thrownError instanceof Error ? thrownError.toString() : thrownError) - ); - - flag(this, 'object', thrownError); - }; - - Assertion.addMethod('throw', assertThrows); - Assertion.addMethod('throws', assertThrows); - Assertion.addMethod('Throw', assertThrows); - - /** - * ### .respondTo(method) - * - * Asserts that the object or class target will respond to a method. - * - * Klass.prototype.bar = function(){}; - * expect(Klass).to.respondTo('bar'); - * expect(obj).to.respondTo('bar'); - * - * To check if a constructor will respond to a static function, - * set the `itself` flag. - * - * Klass.baz = function(){}; - * expect(Klass).itself.to.respondTo('baz'); - * - * @name respondTo - * @param {String} method - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('respondTo', function (method, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object') - , itself = flag(this, 'itself') - , context = ('function' === _.type(obj) && !itself) - ? obj.prototype[method] - : obj[method]; - - this.assert( - 'function' === typeof context - , 'expected #{this} to respond to ' + _.inspect(method) - , 'expected #{this} to not respond to ' + _.inspect(method) - ); - }); - - /** - * ### .itself - * - * Sets the `itself` flag, later used by the `respondTo` assertion. - * - * function Foo() {} - * Foo.bar = function() {} - * Foo.prototype.baz = function() {} - * - * expect(Foo).itself.to.respondTo('bar'); - * expect(Foo).itself.not.to.respondTo('baz'); - * - * @name itself - * @api public - */ - - Assertion.addProperty('itself', function () { - flag(this, 'itself', true); - }); - - /** - * ### .satisfy(method) - * - * Asserts that the target passes a given truth test. - * - * expect(1).to.satisfy(function(num) { return num > 0; }); - * - * @name satisfy - * @param {Function} matcher - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('satisfy', function (matcher, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - matcher(obj) - , 'expected #{this} to satisfy ' + _.objDisplay(matcher) - , 'expected #{this} to not satisfy' + _.objDisplay(matcher) - , this.negate ? false : true - , matcher(obj) - ); - }); - - /** - * ### .closeTo(expected, delta) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * expect(1.5).to.be.closeTo(1, 0.5); - * - * @name closeTo - * @param {Number} expected - * @param {Number} delta - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('closeTo', function (expected, delta, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - this.assert( - Math.abs(obj - expected) <= delta - , 'expected #{this} to be close to ' + expected + ' +/- ' + delta - , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta - ); - }); - - function isSubsetOf(subset, superset) { - return subset.every(function(elem) { - return superset.indexOf(elem) !== -1; - }) - } - - /** - * ### .members(set) - * - * Asserts that the target is a superset of `set`, - * or that the target and `set` have the same members. - * - * expect([1, 2, 3]).to.include.members([3, 2]); - * expect([1, 2, 3]).to.not.include.members([3, 2, 8]); - * - * expect([4, 2]).to.have.members([2, 4]); - * expect([5, 2]).to.not.have.members([5, 2, 1]); - * - * @name members - * @param {Array} set - * @param {String} message _optional_ - * @api public - */ - - Assertion.addMethod('members', function (subset, msg) { - if (msg) flag(this, 'message', msg); - var obj = flag(this, 'object'); - - new Assertion(obj).to.be.an('array'); - new Assertion(subset).to.be.an('array'); - - if (flag(this, 'contains')) { - return this.assert( - isSubsetOf(subset, obj) - , 'expected #{this} to be a superset of #{act}' - , 'expected #{this} to not be a superset of #{act}' - , obj - , subset - ); - } - - this.assert( - isSubsetOf(obj, subset) && isSubsetOf(subset, obj) - , 'expected #{this} to have the same members as #{act}' - , 'expected #{this} to not have the same members as #{act}' - , obj - , subset - ); - }); -}; - -}); -require.register("chai/lib/chai/interface/assert.js", function(exports, require, module){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - - -module.exports = function (chai, util) { - - /*! - * Chai dependencies. - */ - - var Assertion = chai.Assertion - , flag = util.flag; - - /*! - * Module export. - */ - - /** - * ### assert(expression, message) - * - * Write your own test expressions. - * - * assert('foo' !== 'bar', 'foo is not bar'); - * assert(Array.isArray([]), 'empty arrays are arrays'); - * - * @param {Mixed} expression to test for truthiness - * @param {String} message to display on error - * @name assert - * @api public - */ - - var assert = chai.assert = function (express, errmsg) { - var test = new Assertion(null); - test.assert( - express - , errmsg - , '[ negation message unavailable ]' - ); - }; - - /** - * ### .fail(actual, expected, [message], [operator]) - * - * Throw a failure. Node.js `assert` module-compatible. - * - * @name fail - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @param {String} operator - * @api public - */ - - assert.fail = function (actual, expected, message, operator) { - message = message || 'assert.fail()'; - throw new chai.AssertionError(message, { - actual: actual - , expected: expected - , operator: operator - }, assert.fail); - }; - - /** - * ### .ok(object, [message]) - * - * Asserts that `object` is truthy. - * - * assert.ok('everything', 'everything is ok'); - * assert.ok(false, 'this will fail'); - * - * @name ok - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.ok = function (val, msg) { - new Assertion(val, msg).is.ok; - }; - - /** - * ### .notOk(object, [message]) - * - * Asserts that `object` is falsy. - * - * assert.notOk('everything', 'this will fail'); - * assert.notOk(false, 'this will pass'); - * - * @name notOk - * @param {Mixed} object to test - * @param {String} message - * @api public - */ - - assert.notOk = function (val, msg) { - new Assertion(val, msg).is.not.ok; - }; - - /** - * ### .equal(actual, expected, [message]) - * - * Asserts non-strict equality (`==`) of `actual` and `expected`. - * - * assert.equal(3, '3', '== coerces values to strings'); - * - * @name equal - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.equal = function (act, exp, msg) { - var test = new Assertion(act, msg); - - test.assert( - exp == flag(test, 'object') - , 'expected #{this} to equal #{exp}' - , 'expected #{this} to not equal #{act}' - , exp - , act - ); - }; - - /** - * ### .notEqual(actual, expected, [message]) - * - * Asserts non-strict inequality (`!=`) of `actual` and `expected`. - * - * assert.notEqual(3, 4, 'these numbers are not equal'); - * - * @name notEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notEqual = function (act, exp, msg) { - var test = new Assertion(act, msg); - - test.assert( - exp != flag(test, 'object') - , 'expected #{this} to not equal #{exp}' - , 'expected #{this} to equal #{act}' - , exp - , act - ); - }; - - /** - * ### .strictEqual(actual, expected, [message]) - * - * Asserts strict equality (`===`) of `actual` and `expected`. - * - * assert.strictEqual(true, true, 'these booleans are strictly equal'); - * - * @name strictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.strictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.equal(exp); - }; - - /** - * ### .notStrictEqual(actual, expected, [message]) - * - * Asserts strict inequality (`!==`) of `actual` and `expected`. - * - * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); - * - * @name notStrictEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notStrictEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.equal(exp); - }; - - /** - * ### .deepEqual(actual, expected, [message]) - * - * Asserts that `actual` is deeply equal to `expected`. - * - * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); - * - * @name deepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.deepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.eql(exp); - }; - - /** - * ### .notDeepEqual(actual, expected, [message]) - * - * Assert that `actual` is not deeply equal to `expected`. - * - * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); - * - * @name notDeepEqual - * @param {Mixed} actual - * @param {Mixed} expected - * @param {String} message - * @api public - */ - - assert.notDeepEqual = function (act, exp, msg) { - new Assertion(act, msg).to.not.eql(exp); - }; - - /** - * ### .isTrue(value, [message]) - * - * Asserts that `value` is true. - * - * var teaServed = true; - * assert.isTrue(teaServed, 'the tea has been served'); - * - * @name isTrue - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isTrue = function (val, msg) { - new Assertion(val, msg).is['true']; - }; - - /** - * ### .isFalse(value, [message]) - * - * Asserts that `value` is false. - * - * var teaServed = false; - * assert.isFalse(teaServed, 'no tea yet? hmm...'); - * - * @name isFalse - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFalse = function (val, msg) { - new Assertion(val, msg).is['false']; - }; - - /** - * ### .isNull(value, [message]) - * - * Asserts that `value` is null. - * - * assert.isNull(err, 'there was no error'); - * - * @name isNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNull = function (val, msg) { - new Assertion(val, msg).to.equal(null); - }; - - /** - * ### .isNotNull(value, [message]) - * - * Asserts that `value` is not null. - * - * var tea = 'tasty chai'; - * assert.isNotNull(tea, 'great, time for tea!'); - * - * @name isNotNull - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNull = function (val, msg) { - new Assertion(val, msg).to.not.equal(null); - }; - - /** - * ### .isUndefined(value, [message]) - * - * Asserts that `value` is `undefined`. - * - * var tea; - * assert.isUndefined(tea, 'no tea defined'); - * - * @name isUndefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isUndefined = function (val, msg) { - new Assertion(val, msg).to.equal(undefined); - }; - - /** - * ### .isDefined(value, [message]) - * - * Asserts that `value` is not `undefined`. - * - * var tea = 'cup of chai'; - * assert.isDefined(tea, 'tea has been defined'); - * - * @name isDefined - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isDefined = function (val, msg) { - new Assertion(val, msg).to.not.equal(undefined); - }; - - /** - * ### .isFunction(value, [message]) - * - * Asserts that `value` is a function. - * - * function serveTea() { return 'cup of tea'; }; - * assert.isFunction(serveTea, 'great, we can have tea now'); - * - * @name isFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isFunction = function (val, msg) { - new Assertion(val, msg).to.be.a('function'); - }; - - /** - * ### .isNotFunction(value, [message]) - * - * Asserts that `value` is _not_ a function. - * - * var serveTea = [ 'heat', 'pour', 'sip' ]; - * assert.isNotFunction(serveTea, 'great, we have listed the steps'); - * - * @name isNotFunction - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotFunction = function (val, msg) { - new Assertion(val, msg).to.not.be.a('function'); - }; - - /** - * ### .isObject(value, [message]) - * - * Asserts that `value` is an object (as revealed by - * `Object.prototype.toString`). - * - * var selection = { name: 'Chai', serve: 'with spices' }; - * assert.isObject(selection, 'tea selection is an object'); - * - * @name isObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isObject = function (val, msg) { - new Assertion(val, msg).to.be.a('object'); - }; - - /** - * ### .isNotObject(value, [message]) - * - * Asserts that `value` is _not_ an object. - * - * var selection = 'chai' - * assert.isObject(selection, 'tea selection is not an object'); - * assert.isObject(null, 'null is not an object'); - * - * @name isNotObject - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotObject = function (val, msg) { - new Assertion(val, msg).to.not.be.a('object'); - }; - - /** - * ### .isArray(value, [message]) - * - * Asserts that `value` is an array. - * - * var menu = [ 'green', 'chai', 'oolong' ]; - * assert.isArray(menu, 'what kind of tea do we want?'); - * - * @name isArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isArray = function (val, msg) { - new Assertion(val, msg).to.be.an('array'); - }; - - /** - * ### .isNotArray(value, [message]) - * - * Asserts that `value` is _not_ an array. - * - * var menu = 'green|chai|oolong'; - * assert.isNotArray(menu, 'what kind of tea do we want?'); - * - * @name isNotArray - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotArray = function (val, msg) { - new Assertion(val, msg).to.not.be.an('array'); - }; - - /** - * ### .isString(value, [message]) - * - * Asserts that `value` is a string. - * - * var teaOrder = 'chai'; - * assert.isString(teaOrder, 'order placed'); - * - * @name isString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isString = function (val, msg) { - new Assertion(val, msg).to.be.a('string'); - }; - - /** - * ### .isNotString(value, [message]) - * - * Asserts that `value` is _not_ a string. - * - * var teaOrder = 4; - * assert.isNotString(teaOrder, 'order placed'); - * - * @name isNotString - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotString = function (val, msg) { - new Assertion(val, msg).to.not.be.a('string'); - }; - - /** - * ### .isNumber(value, [message]) - * - * Asserts that `value` is a number. - * - * var cups = 2; - * assert.isNumber(cups, 'how many cups'); - * - * @name isNumber - * @param {Number} value - * @param {String} message - * @api public - */ - - assert.isNumber = function (val, msg) { - new Assertion(val, msg).to.be.a('number'); - }; - - /** - * ### .isNotNumber(value, [message]) - * - * Asserts that `value` is _not_ a number. - * - * var cups = '2 cups please'; - * assert.isNotNumber(cups, 'how many cups'); - * - * @name isNotNumber - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotNumber = function (val, msg) { - new Assertion(val, msg).to.not.be.a('number'); - }; - - /** - * ### .isBoolean(value, [message]) - * - * Asserts that `value` is a boolean. - * - * var teaReady = true - * , teaServed = false; - * - * assert.isBoolean(teaReady, 'is the tea ready'); - * assert.isBoolean(teaServed, 'has tea been served'); - * - * @name isBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isBoolean = function (val, msg) { - new Assertion(val, msg).to.be.a('boolean'); - }; - - /** - * ### .isNotBoolean(value, [message]) - * - * Asserts that `value` is _not_ a boolean. - * - * var teaReady = 'yep' - * , teaServed = 'nope'; - * - * assert.isNotBoolean(teaReady, 'is the tea ready'); - * assert.isNotBoolean(teaServed, 'has tea been served'); - * - * @name isNotBoolean - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.isNotBoolean = function (val, msg) { - new Assertion(val, msg).to.not.be.a('boolean'); - }; - - /** - * ### .typeOf(value, name, [message]) - * - * Asserts that `value`'s type is `name`, as determined by - * `Object.prototype.toString`. - * - * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object'); - * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array'); - * assert.typeOf('tea', 'string', 'we have a string'); - * assert.typeOf(/tea/, 'regexp', 'we have a regular expression'); - * assert.typeOf(null, 'null', 'we have a null'); - * assert.typeOf(undefined, 'undefined', 'we have an undefined'); - * - * @name typeOf - * @param {Mixed} value - * @param {String} name - * @param {String} message - * @api public - */ - - assert.typeOf = function (val, type, msg) { - new Assertion(val, msg).to.be.a(type); - }; - - /** - * ### .notTypeOf(value, name, [message]) - * - * Asserts that `value`'s type is _not_ `name`, as determined by - * `Object.prototype.toString`. - * - * assert.notTypeOf('tea', 'number', 'strings are not numbers'); - * - * @name notTypeOf - * @param {Mixed} value - * @param {String} typeof name - * @param {String} message - * @api public - */ - - assert.notTypeOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.a(type); - }; - - /** - * ### .instanceOf(object, constructor, [message]) - * - * Asserts that `value` is an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new Tea('chai'); - * - * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); - * - * @name instanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.instanceOf = function (val, type, msg) { - new Assertion(val, msg).to.be.instanceOf(type); - }; - - /** - * ### .notInstanceOf(object, constructor, [message]) - * - * Asserts `value` is not an instance of `constructor`. - * - * var Tea = function (name) { this.name = name; } - * , chai = new String('chai'); - * - * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); - * - * @name notInstanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message - * @api public - */ - - assert.notInstanceOf = function (val, type, msg) { - new Assertion(val, msg).to.not.be.instanceOf(type); - }; - - /** - * ### .include(haystack, needle, [message]) - * - * Asserts that `haystack` includes `needle`. Works - * for strings and arrays. - * - * assert.include('foobar', 'bar', 'foobar contains string "bar"'); - * assert.include([ 1, 2, 3 ], 3, 'array contains value'); - * - * @name include - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.include = function (exp, inc, msg) { - new Assertion(exp, msg).include(inc); - }; - - /** - * ### .notInclude(haystack, needle, [message]) - * - * Asserts that `haystack` does not include `needle`. Works - * for strings and arrays. - *i - * assert.notInclude('foobar', 'baz', 'string not include substring'); - * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value'); - * - * @name notInclude - * @param {Array|String} haystack - * @param {Mixed} needle - * @param {String} message - * @api public - */ - - assert.notInclude = function (exp, inc, msg) { - new Assertion(exp, msg).not.include(inc); - }; - - /** - * ### .match(value, regexp, [message]) - * - * Asserts that `value` matches the regular expression `regexp`. - * - * assert.match('foobar', /^foo/, 'regexp matches'); - * - * @name match - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.match = function (exp, re, msg) { - new Assertion(exp, msg).to.match(re); - }; - - /** - * ### .notMatch(value, regexp, [message]) - * - * Asserts that `value` does not match the regular expression `regexp`. - * - * assert.notMatch('foobar', /^foo/, 'regexp does not match'); - * - * @name notMatch - * @param {Mixed} value - * @param {RegExp} regexp - * @param {String} message - * @api public - */ - - assert.notMatch = function (exp, re, msg) { - new Assertion(exp, msg).to.not.match(re); - }; - - /** - * ### .property(object, property, [message]) - * - * Asserts that `object` has a property named by `property`. - * - * assert.property({ tea: { green: 'matcha' }}, 'tea'); - * - * @name property - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.property = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.property(prop); - }; - - /** - * ### .notProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`. - * - * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); - * - * @name notProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.property(prop); - }; - - /** - * ### .deepProperty(object, property, [message]) - * - * Asserts that `object` has a property named by `property`, which can be a - * string using dot- and bracket-notation for deep reference. - * - * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green'); - * - * @name deepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.deepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.have.deep.property(prop); - }; - - /** - * ### .notDeepProperty(object, property, [message]) - * - * Asserts that `object` does _not_ have a property named by `property`, which - * can be a string using dot- and bracket-notation for deep reference. - * - * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); - * - * @name notDeepProperty - * @param {Object} object - * @param {String} property - * @param {String} message - * @api public - */ - - assert.notDeepProperty = function (obj, prop, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop); - }; - - /** - * ### .propertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. - * - * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); - * - * @name propertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.property(prop, val); - }; - - /** - * ### .propertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. - * - * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad'); - * - * @name propertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.propertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.property(prop, val); - }; - - /** - * ### .deepPropertyVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property` with value given - * by `value`. `property` can use dot- and bracket-notation for deep - * reference. - * - * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); - * - * @name deepPropertyVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.have.deep.property(prop, val); - }; - - /** - * ### .deepPropertyNotVal(object, property, value, [message]) - * - * Asserts that `object` has a property named by `property`, but with a value - * different from that given by `value`. `property` can use dot- and - * bracket-notation for deep reference. - * - * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha'); - * - * @name deepPropertyNotVal - * @param {Object} object - * @param {String} property - * @param {Mixed} value - * @param {String} message - * @api public - */ - - assert.deepPropertyNotVal = function (obj, prop, val, msg) { - new Assertion(obj, msg).to.not.have.deep.property(prop, val); - }; - - /** - * ### .lengthOf(object, length, [message]) - * - * Asserts that `object` has a `length` property with the expected value. - * - * assert.lengthOf([1,2,3], 3, 'array has length of 3'); - * assert.lengthOf('foobar', 5, 'string has length of 6'); - * - * @name lengthOf - * @param {Mixed} object - * @param {Number} length - * @param {String} message - * @api public - */ - - assert.lengthOf = function (exp, len, msg) { - new Assertion(exp, msg).to.have.length(len); - }; - - /** - * ### .throws(function, [constructor/string/regexp], [string/regexp], [message]) - * - * Asserts that `function` will throw an error that is an instance of - * `constructor`, or alternately that it will throw an error with message - * matching `regexp`. - * - * assert.throw(fn, 'function throws a reference error'); - * assert.throw(fn, /function throws a reference error/); - * assert.throw(fn, ReferenceError); - * assert.throw(fn, ReferenceError, 'function throws a reference error'); - * assert.throw(fn, ReferenceError, /function throws a reference error/); - * - * @name throws - * @alias throw - * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.Throw = function (fn, errt, errs, msg) { - if ('string' === typeof errt || errt instanceof RegExp) { - errs = errt; - errt = null; - } - - var assertErr = new Assertion(fn, msg).to.Throw(errt, errs); - return flag(assertErr, 'object'); - }; - - /** - * ### .doesNotThrow(function, [constructor/regexp], [message]) - * - * Asserts that `function` will _not_ throw an error that is an instance of - * `constructor`, or alternately that it will not throw an error with message - * matching `regexp`. - * - * assert.doesNotThrow(fn, Error, 'function does not throw'); - * - * @name doesNotThrow - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message - * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @api public - */ - - assert.doesNotThrow = function (fn, type, msg) { - if ('string' === typeof type) { - msg = type; - type = null; - } - - new Assertion(fn, msg).to.not.Throw(type); - }; - - /** - * ### .operator(val1, operator, val2, [message]) - * - * Compares two values using `operator`. - * - * assert.operator(1, '<', 2, 'everything is ok'); - * assert.operator(1, '>', 2, 'this will fail'); - * - * @name operator - * @param {Mixed} val1 - * @param {String} operator - * @param {Mixed} val2 - * @param {String} message - * @api public - */ - - assert.operator = function (val, operator, val2, msg) { - if (!~['==', '===', '>', '>=', '<', '<=', '!=', '!=='].indexOf(operator)) { - throw new Error('Invalid operator "' + operator + '"'); - } - var test = new Assertion(eval(val + operator + val2), msg); - test.assert( - true === flag(test, 'object') - , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2) - , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) ); - }; - - /** - * ### .closeTo(actual, expected, delta, [message]) - * - * Asserts that the target is equal `expected`, to within a +/- `delta` range. - * - * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); - * - * @name closeTo - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message - * @api public - */ - - assert.closeTo = function (act, exp, delta, msg) { - new Assertion(act, msg).to.be.closeTo(exp, delta); - }; - - /** - * ### .sameMembers(set1, set2, [message]) - * - * Asserts that `set1` and `set2` have the same members. - * Order is not taken into account. - * - * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members'); - * - * @name sameMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @api public - */ - - assert.sameMembers = function (set1, set2, msg) { - new Assertion(set1, msg).to.have.same.members(set2); - } - - /** - * ### .includeMembers(superset, subset, [message]) - * - * Asserts that `subset` is included in `superset`. - * Order is not taken into account. - * - * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members'); - * - * @name includeMembers - * @param {Array} superset - * @param {Array} subset - * @param {String} message - * @api public - */ - - assert.includeMembers = function (superset, subset, msg) { - new Assertion(superset, msg).to.include.members(subset); - } - - /*! - * Undocumented / untested - */ - - assert.ifError = function (val, msg) { - new Assertion(val, msg).to.not.be.ok; - }; - - /*! - * Aliases. - */ - - (function alias(name, as){ - assert[as] = assert[name]; - return alias; - }) - ('Throw', 'throw') - ('Throw', 'throws'); -}; - -}); -require.register("chai/lib/chai/interface/expect.js", function(exports, require, module){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - chai.expect = function (val, message) { - return new chai.Assertion(val, message); - }; -}; - - -}); -require.register("chai/lib/chai/interface/should.js", function(exports, require, module){ -/*! - * chai - * Copyright(c) 2011-2014 Jake Luer - * MIT Licensed - */ - -module.exports = function (chai, util) { - var Assertion = chai.Assertion; - - function loadShould () { - // modify Object.prototype to have `should` - Object.defineProperty(Object.prototype, 'should', - { - set: function (value) { - // See https://github.com/chaijs/chai/issues/86: this makes - // `whatever.should = someValue` actually set `someValue`, which is - // especially useful for `global.should = require('chai').should()`. - // - // Note that we have to use [[DefineProperty]] instead of [[Put]] - // since otherwise we would trigger this very setter! - Object.defineProperty(this, 'should', { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } - , get: function(){ - if (this instanceof String || this instanceof Number) { - return new Assertion(this.constructor(this)); - } else if (this instanceof Boolean) { - return new Assertion(this == true); - } - return new Assertion(this); - } - , configurable: true - }); - - var should = {}; - - should.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.equal(val2); - }; - - should.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.Throw(errt, errs); - }; - - should.exist = function (val, msg) { - new Assertion(val, msg).to.exist; - } - - // negation - should.not = {} - - should.not.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.not.equal(val2); - }; - - should.not.Throw = function (fn, errt, errs, msg) { - new Assertion(fn, msg).to.not.Throw(errt, errs); - }; - - should.not.exist = function (val, msg) { - new Assertion(val, msg).to.not.exist; - } - - should['throw'] = should['Throw']; - should.not['throw'] = should.not['Throw']; - - return should; - }; - - chai.should = loadShould; - chai.Should = loadShould; -}; - -}); -require.register("chai/lib/chai/utils/addChainableMethod.js", function(exports, require, module){ -/*! - * Chai - addChainingMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependencies - */ - -var transferFlags = require('./transferFlags'); - -/*! - * Module variables - */ - -// Check whether `__proto__` is supported -var hasProtoSupport = '__proto__' in Object; - -// Without `__proto__` support, this module will need to add properties to a function. -// However, some Function.prototype methods cannot be overwritten, -// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69). -var excludeNames = /^(?:length|name|arguments|caller)$/; - -// Cache `Function` properties -var call = Function.prototype.call, - apply = Function.prototype.apply; - -/** - * ### addChainableMethod (ctx, name, method, chainingBehavior) - * - * Adds a method to an object, such that the method can also be chained. - * - * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior); - * - * The result can then be used as both a method assertion, executing both `method` and - * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`. - * - * expect(fooStr).to.be.foo('bar'); - * expect(fooStr).to.be.foo.equal('foo'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for `name`, when called - * @param {Function} chainingBehavior function to be called every time the property is accessed - * @name addChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - if (typeof chainingBehavior !== 'function') { - chainingBehavior = function () { }; - } - - var chainableBehavior = { - method: method - , chainingBehavior: chainingBehavior - }; - - // save the methods so we can overwrite them later, if we need to. - if (!ctx.__methods) { - ctx.__methods = {}; - } - ctx.__methods[name] = chainableBehavior; - - Object.defineProperty(ctx, name, - { get: function () { - chainableBehavior.chainingBehavior.call(this); - - var assert = function () { - var result = chainableBehavior.method.apply(this, arguments); - return result === undefined ? this : result; - }; - - // Use `__proto__` if available - if (hasProtoSupport) { - // Inherit all properties from the object by replacing the `Function` prototype - var prototype = assert.__proto__ = Object.create(this); - // Restore the `call` and `apply` methods from `Function` - prototype.call = call; - prototype.apply = apply; - } - // Otherwise, redefine all properties (slow!) - else { - var asserterNames = Object.getOwnPropertyNames(ctx); - asserterNames.forEach(function (asserterName) { - if (!excludeNames.test(asserterName)) { - var pd = Object.getOwnPropertyDescriptor(ctx, asserterName); - Object.defineProperty(assert, asserterName, pd); - } - }); - } - - transferFlags(this, assert); - return assert; - } - , configurable: true - }); -}; - -}); -require.register("chai/lib/chai/utils/addMethod.js", function(exports, require, module){ -/*! - * Chai - addMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .addMethod (ctx, name, method) - * - * Adds a method to the prototype of an object. - * - * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(fooStr).to.be.foo('bar'); - * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add - * @param {Function} method function to be used for name - * @name addMethod - * @api public - */ - -module.exports = function (ctx, name, method) { - ctx[name] = function () { - var result = method.apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -}); -require.register("chai/lib/chai/utils/addProperty.js", function(exports, require, module){ -/*! - * Chai - addProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### addProperty (ctx, name, getter) - * - * Adds a property to the prototype of an object. - * - * utils.addProperty(chai.Assertion.prototype, 'foo', function () { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.instanceof(Foo); - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.addProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.foo; - * - * @param {Object} ctx object to which the property is added - * @param {String} name of property to add - * @param {Function} getter function to be used for name - * @name addProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - Object.defineProperty(ctx, name, - { get: function () { - var result = getter.call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -}); -require.register("chai/lib/chai/utils/flag.js", function(exports, require, module){ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### flag(object ,key, [value]) - * - * Get or set a flag value on an object. If a - * value is provided it will be set, else it will - * return the currently set value or `undefined` if - * the value is not set. - * - * utils.flag(this, 'foo', 'bar'); // setter - * utils.flag(this, 'foo'); // getter, returns `bar` - * - * @param {Object} object (constructed Assertion - * @param {String} key - * @param {Mixed} value (optional) - * @name flag - * @api private - */ - -module.exports = function (obj, key, value) { - var flags = obj.__flags || (obj.__flags = Object.create(null)); - if (arguments.length === 3) { - flags[key] = value; - } else { - return flags[key]; - } -}; - -}); -require.register("chai/lib/chai/utils/getActual.js", function(exports, require, module){ -/*! - * Chai - getActual utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getActual(object, [actual]) - * - * Returns the `actual` value for an Assertion - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - var actual = args[4]; - return 'undefined' !== typeof actual ? actual : obj._obj; -}; - -}); -require.register("chai/lib/chai/utils/getEnumerableProperties.js", function(exports, require, module){ -/*! - * Chai - getEnumerableProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getEnumerableProperties(object) - * - * This allows the retrieval of enumerable property names of an object, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getEnumerableProperties - * @api public - */ - -module.exports = function getEnumerableProperties(object) { - var result = []; - for (var name in object) { - result.push(name); - } - return result; -}; - -}); -require.register("chai/lib/chai/utils/getMessage.js", function(exports, require, module){ -/*! - * Chai - message composition utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag') - , getActual = require('./getActual') - , inspect = require('./inspect') - , objDisplay = require('./objDisplay'); - -/** - * ### .getMessage(object, message, negateMessage) - * - * Construct the error message based on flags - * and template tags. Template tags will return - * a stringified inspection of the object referenced. - * - * Message template tags: - * - `#{this}` current asserted object - * - `#{act}` actual value - * - `#{exp}` expected value - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - * @name getMessage - * @api public - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , val = flag(obj, 'object') - , expected = args[3] - , actual = getActual(obj, args) - , msg = negate ? args[2] : args[1] - , flagMsg = flag(obj, 'message'); - - msg = msg || ''; - msg = msg - .replace(/#{this}/g, objDisplay(val)) - .replace(/#{act}/g, objDisplay(actual)) - .replace(/#{exp}/g, objDisplay(expected)); - - return flagMsg ? flagMsg + ': ' + msg : msg; -}; - -}); -require.register("chai/lib/chai/utils/getName.js", function(exports, require, module){ -/*! - * Chai - getName utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * # getName(func) - * - * Gets the name of a function, in a cross-browser way. - * - * @param {Function} a function (usually a constructor) - */ - -module.exports = function (func) { - if (func.name) return func.name; - - var match = /^\s?function ([^(]*)\(/.exec(func); - return match && match[1] ? match[1] : ""; -}; - -}); -require.register("chai/lib/chai/utils/getPathValue.js", function(exports, require, module){ -/*! - * Chai - getPathValue utility - * Copyright(c) 2012-2014 Jake Luer - * @see https://github.com/logicalparadox/filtr - * MIT Licensed - */ - -/** - * ### .getPathValue(path, object) - * - * This allows the retrieval of values in an - * object given a string path. - * - * var obj = { - * prop1: { - * arr: ['a', 'b', 'c'] - * , str: 'Hello' - * } - * , prop2: { - * arr: [ { nested: 'Universe' } ] - * , str: 'Hello again!' - * } - * } - * - * The following would be the results. - * - * getPathValue('prop1.str', obj); // Hello - * getPathValue('prop1.att[2]', obj); // b - * getPathValue('prop2.arr[0].nested', obj); // Universe - * - * @param {String} path - * @param {Object} object - * @returns {Object} value or `undefined` - * @name getPathValue - * @api public - */ - -var getPathValue = module.exports = function (path, obj) { - var parsed = parsePath(path); - return _getPathValue(parsed, obj); -}; - -/*! - * ## parsePath(path) - * - * Helper function used to parse string object - * paths. Use in conjunction with `_getPathValue`. - * - * var parsed = parsePath('myobject.property.subprop'); - * - * ### Paths: - * - * * Can be as near infinitely deep and nested - * * Arrays are also valid using the formal `myobject.document[3].property`. - * - * @param {String} path - * @returns {Object} parsed - * @api private - */ - -function parsePath (path) { - var str = path.replace(/\[/g, '.[') - , parts = str.match(/(\\\.|[^.]+?)+/g); - return parts.map(function (value) { - var re = /\[(\d+)\]$/ - , mArr = re.exec(value) - if (mArr) return { i: parseFloat(mArr[1]) }; - else return { p: value }; - }); -}; - -/*! - * ## _getPathValue(parsed, obj) - * - * Helper companion function for `.parsePath` that returns - * the value located at the parsed address. - * - * var value = getPathValue(parsed, obj); - * - * @param {Object} parsed definition from `parsePath`. - * @param {Object} object to search against - * @returns {Object|Undefined} value - * @api private - */ - -function _getPathValue (parsed, obj) { - var tmp = obj - , res; - for (var i = 0, l = parsed.length; i < l; i++) { - var part = parsed[i]; - if (tmp) { - if ('undefined' !== typeof part.p) - tmp = tmp[part.p]; - else if ('undefined' !== typeof part.i) - tmp = tmp[part.i]; - if (i == (l - 1)) res = tmp; - } else { - res = undefined; - } - } - return res; -}; - -}); -require.register("chai/lib/chai/utils/getProperties.js", function(exports, require, module){ -/*! - * Chai - getProperties utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### .getProperties(object) - * - * This allows the retrieval of property names of an object, enumerable or not, - * inherited or not. - * - * @param {Object} object - * @returns {Array} - * @name getProperties - * @api public - */ - -module.exports = function getProperties(object) { - var result = Object.getOwnPropertyNames(subject); - - function addProperty(property) { - if (result.indexOf(property) === -1) { - result.push(property); - } - } - - var proto = Object.getPrototypeOf(subject); - while (proto !== null) { - Object.getOwnPropertyNames(proto).forEach(addProperty); - proto = Object.getPrototypeOf(proto); - } - - return result; -}; - -}); -require.register("chai/lib/chai/utils/index.js", function(exports, require, module){ -/*! - * chai - * Copyright(c) 2011 Jake Luer - * MIT Licensed - */ - -/*! - * Main exports - */ - -var exports = module.exports = {}; - -/*! - * test utility - */ - -exports.test = require('./test'); - -/*! - * type utility - */ - -exports.type = require('./type'); - -/*! - * message utility - */ - -exports.getMessage = require('./getMessage'); - -/*! - * actual utility - */ - -exports.getActual = require('./getActual'); - -/*! - * Inspect util - */ - -exports.inspect = require('./inspect'); - -/*! - * Object Display util - */ - -exports.objDisplay = require('./objDisplay'); - -/*! - * Flag utility - */ - -exports.flag = require('./flag'); - -/*! - * Flag transferring utility - */ - -exports.transferFlags = require('./transferFlags'); - -/*! - * Deep equal utility - */ - -exports.eql = require('deep-eql'); - -/*! - * Deep path value - */ - -exports.getPathValue = require('./getPathValue'); - -/*! - * Function name - */ - -exports.getName = require('./getName'); - -/*! - * add Property - */ - -exports.addProperty = require('./addProperty'); - -/*! - * add Method - */ - -exports.addMethod = require('./addMethod'); - -/*! - * overwrite Property - */ - -exports.overwriteProperty = require('./overwriteProperty'); - -/*! - * overwrite Method - */ - -exports.overwriteMethod = require('./overwriteMethod'); - -/*! - * Add a chainable method - */ - -exports.addChainableMethod = require('./addChainableMethod'); - -/*! - * Overwrite chainable method - */ - -exports.overwriteChainableMethod = require('./overwriteChainableMethod'); - - -}); -require.register("chai/lib/chai/utils/inspect.js", function(exports, require, module){ -// This is (almost) directly from Node.js utils -// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js - -var getName = require('./getName'); -var getProperties = require('./getProperties'); -var getEnumerableProperties = require('./getEnumerableProperties'); - -module.exports = inspect; - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Boolean} showHidden Flag that shows hidden (not enumerable) - * properties of objects. - * @param {Number} depth Depth in which to descend in object. Default is 2. - * @param {Boolean} colors Flag to turn on ANSI escape codes to color the - * output. Default is false (no coloring). - */ -function inspect(obj, showHidden, depth, colors) { - var ctx = { - showHidden: showHidden, - seen: [], - stylize: function (str) { return str; } - }; - return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); -} - -// https://gist.github.com/1044128/ -var getOuterHTML = function(element) { - if ('outerHTML' in element) return element.outerHTML; - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - var elemProto = (window.HTMLElement || window.Element).prototype; - var xmlSerializer = new XMLSerializer(); - var html; - if (document.xmlVersion) { - return xmlSerializer.serializeToString(element); - } else { - container.appendChild(element.cloneNode(false)); - html = container.innerHTML.replace('><', '>' + element.innerHTML + '<'); - container.innerHTML = ''; - return html; - } -}; - -// Returns true if object is a DOM element. -var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } -}; - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes); - if (typeof ret !== 'string') { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // If it's DOM elem, get outer HTML. - if (isDOMElement(value)) { - return getOuterHTML(value); - } - - // Look up the keys of the object. - var visibleKeys = getEnumerableProperties(value); - var keys = ctx.showHidden ? getProperties(value) : visibleKeys; - - // Some type of object without properties can be shortcutted. - // In IE, errors have a single `stack` property, or if they are vanilla `Error`, - // a `stack` plus `description` property; ignore those for consistency. - if (keys.length === 0 || (isError(value) && ( - (keys.length === 1 && keys[0] === 'stack') || - (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') - ))) { - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - return ctx.stylize('[Function' + nameSuffix + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var name = getName(value); - var nameSuffix = name ? ': ' + name : ''; - base = ' [Function' + nameSuffix + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - return formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - switch (typeof value) { - case 'undefined': - return ctx.stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - - case 'number': - return ctx.stylize('' + value, 'number'); - - case 'boolean': - return ctx.stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return ctx.stylize('null', 'null'); - } -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (Object.prototype.hasOwnProperty.call(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = ctx.stylize('[Setter]', 'special'); - } - } - } - if (visibleKeys.indexOf(key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(value[key]) < 0) { - if (recurseTimes === null) { - str = formatValue(ctx, value[key], null); - } else { - str = formatValue(ctx, value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - -function isArray(ar) { - return Array.isArray(ar) || - (typeof ar === 'object' && objectToString(ar) === '[object Array]'); -} - -function isRegExp(re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} - -function isError(e) { - return typeof e === 'object' && objectToString(e) === '[object Error]'; -} - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -}); -require.register("chai/lib/chai/utils/objDisplay.js", function(exports, require, module){ -/*! - * Chai - flag utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var inspect = require('./inspect'); - -/** - * ### .objDisplay (object) - * - * Determines if an object or an array matches - * criteria to be inspected in-line for error - * messages or should be truncated. - * - * @param {Mixed} javascript object to inspect - * @name objDisplay - * @api public - */ - -module.exports = function (obj) { - var str = inspect(obj) - , type = Object.prototype.toString.call(obj); - - if (str.length >= 40) { - if (type === '[object Function]') { - return !obj.name || obj.name === '' - ? '[Function]' - : '[Function: ' + obj.name + ']'; - } else if (type === '[object Array]') { - return '[ Array(' + obj.length + ') ]'; - } else if (type === '[object Object]') { - var keys = Object.keys(obj) - , kstr = keys.length > 2 - ? keys.splice(0, 2).join(', ') + ', ...' - : keys.join(', '); - return '{ Object (' + kstr + ') }'; - } else { - return str; - } - } else { - return str; - } -}; - -}); -require.register("chai/lib/chai/utils/overwriteMethod.js", function(exports, require, module){ -/*! - * Chai - overwriteMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteMethod (ctx, name, fn) - * - * Overwites an already existing method and provides - * access to previous function. Must return function - * to be used for name. - * - * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { - * return function (str) { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.value).to.equal(str); - * } else { - * _super.apply(this, arguments); - * } - * } - * }); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteMethod('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.equal('bar'); - * - * @param {Object} ctx object whose method is to be overwritten - * @param {String} name of method to overwrite - * @param {Function} method function that returns a function to be used for name - * @name overwriteMethod - * @api public - */ - -module.exports = function (ctx, name, method) { - var _method = ctx[name] - , _super = function () { return this; }; - - if (_method && 'function' === typeof _method) - _super = _method; - - ctx[name] = function () { - var result = method(_super).apply(this, arguments); - return result === undefined ? this : result; - } -}; - -}); -require.register("chai/lib/chai/utils/overwriteProperty.js", function(exports, require, module){ -/*! - * Chai - overwriteProperty utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteProperty (ctx, name, fn) - * - * Overwites an already existing property getter and provides - * access to previous value. Must return function to use as getter. - * - * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { - * return function () { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.name).to.equal('bar'); - * } else { - * _super.call(this); - * } - * } - * }); - * - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteProperty('foo', fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.be.ok; - * - * @param {Object} ctx object whose property is to be overwritten - * @param {String} name of property to overwrite - * @param {Function} getter function that returns a getter function to be used for name - * @name overwriteProperty - * @api public - */ - -module.exports = function (ctx, name, getter) { - var _get = Object.getOwnPropertyDescriptor(ctx, name) - , _super = function () {}; - - if (_get && 'function' === typeof _get.get) - _super = _get.get - - Object.defineProperty(ctx, name, - { get: function () { - var result = getter(_super).call(this); - return result === undefined ? this : result; - } - , configurable: true - }); -}; - -}); -require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function(exports, require, module){ -/*! - * Chai - overwriteChainableMethod utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### overwriteChainableMethod (ctx, name, fn) - * - * Overwites an already existing chainable method - * and provides access to the previous function or - * property. Must return functions to be used for - * name. - * - * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', - * function (_super) { - * } - * , function (_super) { - * } - * ); - * - * Can also be accessed directly from `chai.Assertion`. - * - * chai.Assertion.overwriteChainableMethod('foo', fn, fn); - * - * Then can be used as any other assertion. - * - * expect(myFoo).to.have.length(3); - * expect(myFoo).to.have.length.above(3); - * - * @param {Object} ctx object whose method / property is to be overwritten - * @param {String} name of method / property to overwrite - * @param {Function} method function that returns a function to be used for name - * @param {Function} chainingBehavior function that returns a function to be used for property - * @name overwriteChainableMethod - * @api public - */ - -module.exports = function (ctx, name, method, chainingBehavior) { - var chainableBehavior = ctx.__methods[name]; - - var _chainingBehavior = chainableBehavior.chainingBehavior; - chainableBehavior.chainingBehavior = function () { - var result = chainingBehavior(_chainingBehavior).call(this); - return result === undefined ? this : result; - }; - - var _method = chainableBehavior.method; - chainableBehavior.method = function () { - var result = method(_method).apply(this, arguments); - return result === undefined ? this : result; - }; -}; - -}); -require.register("chai/lib/chai/utils/test.js", function(exports, require, module){ -/*! - * Chai - test utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Module dependancies - */ - -var flag = require('./flag'); - -/** - * # test(object, expression) - * - * Test and object for expression. - * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments - */ - -module.exports = function (obj, args) { - var negate = flag(obj, 'negate') - , expr = args[0]; - return negate ? !expr : expr; -}; - -}); -require.register("chai/lib/chai/utils/transferFlags.js", function(exports, require, module){ -/*! - * Chai - transferFlags utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/** - * ### transferFlags(assertion, object, includeAll = true) - * - * Transfer all the flags for `assertion` to `object`. If - * `includeAll` is set to `false`, then the base Chai - * assertion flags (namely `object`, `ssfi`, and `message`) - * will not be transferred. - * - * - * var newAssertion = new Assertion(); - * utils.transferFlags(assertion, newAssertion); - * - * var anotherAsseriton = new Assertion(myObj); - * utils.transferFlags(assertion, anotherAssertion, false); - * - * @param {Assertion} assertion the assertion to transfer the flags from - * @param {Object} object the object to transfer the flags too; usually a new assertion - * @param {Boolean} includeAll - * @name getAllFlags - * @api private - */ - -module.exports = function (assertion, object, includeAll) { - var flags = assertion.__flags || (assertion.__flags = Object.create(null)); - - if (!object.__flags) { - object.__flags = Object.create(null); - } - - includeAll = arguments.length === 3 ? includeAll : true; - - for (var flag in flags) { - if (includeAll || - (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { - object.__flags[flag] = flags[flag]; - } - } -}; - -}); -require.register("chai/lib/chai/utils/type.js", function(exports, require, module){ -/*! - * Chai - type utility - * Copyright(c) 2012-2014 Jake Luer - * MIT Licensed - */ - -/*! - * Detectable javascript natives - */ - -var natives = { - '[object Arguments]': 'arguments' - , '[object Array]': 'array' - , '[object Date]': 'date' - , '[object Function]': 'function' - , '[object Number]': 'number' - , '[object RegExp]': 'regexp' - , '[object String]': 'string' -}; - -/** - * ### type(object) - * - * Better implementation of `typeof` detection that can - * be used cross-browser. Handles the inconsistencies of - * Array, `null`, and `undefined` detection. - * - * utils.type({}) // 'object' - * utils.type(null) // `null' - * utils.type(undefined) // `undefined` - * utils.type([]) // `array` - * - * @param {Mixed} object to detect type of - * @name type - * @api private - */ - -module.exports = function (obj) { - var str = Object.prototype.toString.call(obj); - if (natives[str]) return natives[str]; - if (obj === null) return 'null'; - if (obj === undefined) return 'undefined'; - if (obj === Object(obj)) return 'object'; - return typeof obj; -}; - -}); - - - - -require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/index.js"); -require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/index.js"); -require.alias("chaijs-assertion-error/index.js", "assertion-error/index.js"); -require.alias("chaijs-assertion-error/index.js", "chaijs-assertion-error/index.js"); -require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/lib/eql.js"); -require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/index.js"); -require.alias("chaijs-deep-eql/lib/eql.js", "deep-eql/index.js"); -require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detect/lib/type.js"); -require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detect/index.js"); -require.alias("chaijs-type-detect/lib/type.js", "chaijs-type-detect/index.js"); -require.alias("chaijs-deep-eql/lib/eql.js", "chaijs-deep-eql/index.js"); -require.alias("chai/index.js", "chai/index.js");if (typeof exports == "object") { - module.exports = require("chai"); -} else if (typeof define == "function" && define.amd) { - define([], function(){ return require("chai"); }); -} else { - this["chai"] = require("chai"); -}})(); \ No newline at end of file diff --git a/node_modules/doublearray/test/libs/expect.js b/node_modules/doublearray/test/libs/expect.js deleted file mode 100644 index b1e921d..0000000 --- a/node_modules/doublearray/test/libs/expect.js +++ /dev/null @@ -1,1284 +0,0 @@ -(function (global, module) { - - var exports = module.exports; - - /** - * Exports. - */ - - module.exports = expect; - expect.Assertion = Assertion; - - /** - * Exports version. - */ - - expect.version = '0.3.1'; - - /** - * Possible assertion flags. - */ - - var flags = { - not: ['to', 'be', 'have', 'include', 'only'] - , to: ['be', 'have', 'include', 'only', 'not'] - , only: ['have'] - , have: ['own'] - , be: ['an'] - }; - - function expect (obj) { - return new Assertion(obj); - } - - /** - * Constructor - * - * @api private - */ - - function Assertion (obj, flag, parent) { - this.obj = obj; - this.flags = {}; - - if (undefined != parent) { - this.flags[flag] = true; - - for (var i in parent.flags) { - if (parent.flags.hasOwnProperty(i)) { - this.flags[i] = true; - } - } - } - - var $flags = flag ? flags[flag] : keys(flags) - , self = this; - - if ($flags) { - for (var i = 0, l = $flags.length; i < l; i++) { - // avoid recursion - if (this.flags[$flags[i]]) continue; - - var name = $flags[i] - , assertion = new Assertion(this.obj, name, this) - - if ('function' == typeof Assertion.prototype[name]) { - // clone the function, make sure we dont touch the prot reference - var old = this[name]; - this[name] = function () { - return old.apply(self, arguments); - }; - - for (var fn in Assertion.prototype) { - if (Assertion.prototype.hasOwnProperty(fn) && fn != name) { - this[name][fn] = bind(assertion[fn], assertion); - } - } - } else { - this[name] = assertion; - } - } - } - } - - /** - * Performs an assertion - * - * @api private - */ - - Assertion.prototype.assert = function (truth, msg, error, expected) { - var msg = this.flags.not ? error : msg - , ok = this.flags.not ? !truth : truth - , err; - - if (!ok) { - err = new Error(msg.call(this)); - if (arguments.length > 3) { - err.actual = this.obj; - err.expected = expected; - err.showDiff = true; - } - throw err; - } - - this.and = new Assertion(this.obj); - }; - - /** - * Check if the value is truthy - * - * @api public - */ - - Assertion.prototype.ok = function () { - this.assert( - !!this.obj - , function(){ return 'expected ' + i(this.obj) + ' to be truthy' } - , function(){ return 'expected ' + i(this.obj) + ' to be falsy' }); - }; - - /** - * Creates an anonymous function which calls fn with arguments. - * - * @api public - */ - - Assertion.prototype.withArgs = function() { - expect(this.obj).to.be.a('function'); - var fn = this.obj; - var args = Array.prototype.slice.call(arguments); - return expect(function() { fn.apply(null, args); }); - }; - - /** - * Assert that the function throws. - * - * @param {Function|RegExp} callback, or regexp to match error string against - * @api public - */ - - Assertion.prototype.throwError = - Assertion.prototype.throwException = function (fn) { - expect(this.obj).to.be.a('function'); - - var thrown = false - , not = this.flags.not; - - try { - this.obj(); - } catch (e) { - if (isRegExp(fn)) { - var subject = 'string' == typeof e ? e : e.message; - if (not) { - expect(subject).to.not.match(fn); - } else { - expect(subject).to.match(fn); - } - } else if ('function' == typeof fn) { - fn(e); - } - thrown = true; - } - - if (isRegExp(fn) && not) { - // in the presence of a matcher, ensure the `not` only applies to - // the matching. - this.flags.not = false; - } - - var name = this.obj.name || 'fn'; - this.assert( - thrown - , function(){ return 'expected ' + name + ' to throw an exception' } - , function(){ return 'expected ' + name + ' not to throw an exception' }); - }; - - /** - * Checks if the array is empty. - * - * @api public - */ - - Assertion.prototype.empty = function () { - var expectation; - - if ('object' == typeof this.obj && null !== this.obj && !isArray(this.obj)) { - if ('number' == typeof this.obj.length) { - expectation = !this.obj.length; - } else { - expectation = !keys(this.obj).length; - } - } else { - if ('string' != typeof this.obj) { - expect(this.obj).to.be.an('object'); - } - - expect(this.obj).to.have.property('length'); - expectation = !this.obj.length; - } - - this.assert( - expectation - , function(){ return 'expected ' + i(this.obj) + ' to be empty' } - , function(){ return 'expected ' + i(this.obj) + ' to not be empty' }); - return this; - }; - - /** - * Checks if the obj exactly equals another. - * - * @api public - */ - - Assertion.prototype.be = - Assertion.prototype.equal = function (obj) { - this.assert( - obj === this.obj - , function(){ return 'expected ' + i(this.obj) + ' to equal ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not equal ' + i(obj) }); - return this; - }; - - /** - * Checks if the obj sortof equals another. - * - * @api public - */ - - Assertion.prototype.eql = function (obj) { - this.assert( - expect.eql(this.obj, obj) - , function(){ return 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to sort of not equal ' + i(obj) } - , obj); - return this; - }; - - /** - * Assert within start to finish (inclusive). - * - * @param {Number} start - * @param {Number} finish - * @api public - */ - - Assertion.prototype.within = function (start, finish) { - var range = start + '..' + finish; - this.assert( - this.obj >= start && this.obj <= finish - , function(){ return 'expected ' + i(this.obj) + ' to be within ' + range } - , function(){ return 'expected ' + i(this.obj) + ' to not be within ' + range }); - return this; - }; - - /** - * Assert typeof / instance of - * - * @api public - */ - - Assertion.prototype.a = - Assertion.prototype.an = function (type) { - if ('string' == typeof type) { - // proper english in error msg - var n = /^[aeiou]/.test(type) ? 'n' : ''; - - // typeof with support for 'array' - this.assert( - 'array' == type ? isArray(this.obj) : - 'regexp' == type ? isRegExp(this.obj) : - 'object' == type - ? 'object' == typeof this.obj && null !== this.obj - : type == typeof this.obj - , function(){ return 'expected ' + i(this.obj) + ' to be a' + n + ' ' + type } - , function(){ return 'expected ' + i(this.obj) + ' not to be a' + n + ' ' + type }); - } else { - // instanceof - var name = type.name || 'supplied constructor'; - this.assert( - this.obj instanceof type - , function(){ return 'expected ' + i(this.obj) + ' to be an instance of ' + name } - , function(){ return 'expected ' + i(this.obj) + ' not to be an instance of ' + name }); - } - - return this; - }; - - /** - * Assert numeric value above _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.greaterThan = - Assertion.prototype.above = function (n) { - this.assert( - this.obj > n - , function(){ return 'expected ' + i(this.obj) + ' to be above ' + n } - , function(){ return 'expected ' + i(this.obj) + ' to be below ' + n }); - return this; - }; - - /** - * Assert numeric value below _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.lessThan = - Assertion.prototype.below = function (n) { - this.assert( - this.obj < n - , function(){ return 'expected ' + i(this.obj) + ' to be below ' + n } - , function(){ return 'expected ' + i(this.obj) + ' to be above ' + n }); - return this; - }; - - /** - * Assert string value matches _regexp_. - * - * @param {RegExp} regexp - * @api public - */ - - Assertion.prototype.match = function (regexp) { - this.assert( - regexp.exec(this.obj) - , function(){ return 'expected ' + i(this.obj) + ' to match ' + regexp } - , function(){ return 'expected ' + i(this.obj) + ' not to match ' + regexp }); - return this; - }; - - /** - * Assert property "length" exists and has value of _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.length = function (n) { - expect(this.obj).to.have.property('length'); - var len = this.obj.length; - this.assert( - n == len - , function(){ return 'expected ' + i(this.obj) + ' to have a length of ' + n + ' but got ' + len } - , function(){ return 'expected ' + i(this.obj) + ' to not have a length of ' + len }); - return this; - }; - - /** - * Assert property _name_ exists, with optional _val_. - * - * @param {String} name - * @param {Mixed} val - * @api public - */ - - Assertion.prototype.property = function (name, val) { - if (this.flags.own) { - this.assert( - Object.prototype.hasOwnProperty.call(this.obj, name) - , function(){ return 'expected ' + i(this.obj) + ' to have own property ' + i(name) } - , function(){ return 'expected ' + i(this.obj) + ' to not have own property ' + i(name) }); - return this; - } - - if (this.flags.not && undefined !== val) { - if (undefined === this.obj[name]) { - throw new Error(i(this.obj) + ' has no property ' + i(name)); - } - } else { - var hasProp; - try { - hasProp = name in this.obj - } catch (e) { - hasProp = undefined !== this.obj[name] - } - - this.assert( - hasProp - , function(){ return 'expected ' + i(this.obj) + ' to have a property ' + i(name) } - , function(){ return 'expected ' + i(this.obj) + ' to not have a property ' + i(name) }); - } - - if (undefined !== val) { - this.assert( - val === this.obj[name] - , function(){ return 'expected ' + i(this.obj) + ' to have a property ' + i(name) - + ' of ' + i(val) + ', but got ' + i(this.obj[name]) } - , function(){ return 'expected ' + i(this.obj) + ' to not have a property ' + i(name) - + ' of ' + i(val) }); - } - - this.obj = this.obj[name]; - return this; - }; - - /** - * Assert that the array contains _obj_ or string contains _obj_. - * - * @param {Mixed} obj|string - * @api public - */ - - Assertion.prototype.string = - Assertion.prototype.contain = function (obj) { - if ('string' == typeof this.obj) { - this.assert( - ~this.obj.indexOf(obj) - , function(){ return 'expected ' + i(this.obj) + ' to contain ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not contain ' + i(obj) }); - } else { - this.assert( - ~indexOf(this.obj, obj) - , function(){ return 'expected ' + i(this.obj) + ' to contain ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not contain ' + i(obj) }); - } - return this; - }; - - /** - * Assert exact keys or inclusion of keys by using - * the `.own` modifier. - * - * @param {Array|String ...} keys - * @api public - */ - - Assertion.prototype.key = - Assertion.prototype.keys = function ($keys) { - var str - , ok = true; - - $keys = isArray($keys) - ? $keys - : Array.prototype.slice.call(arguments); - - if (!$keys.length) throw new Error('keys required'); - - var actual = keys(this.obj) - , len = $keys.length; - - // Inclusion - ok = every($keys, function (key) { - return ~indexOf(actual, key); - }); - - // Strict - if (!this.flags.not && this.flags.only) { - ok = ok && $keys.length == actual.length; - } - - // Key string - if (len > 1) { - $keys = map($keys, function (key) { - return i(key); - }); - var last = $keys.pop(); - str = $keys.join(', ') + ', and ' + last; - } else { - str = i($keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (!this.flags.only ? 'include ' : 'only have ') + str; - - // Assertion - this.assert( - ok - , function(){ return 'expected ' + i(this.obj) + ' to ' + str } - , function(){ return 'expected ' + i(this.obj) + ' to not ' + str }); - - return this; - }; - - /** - * Assert a failure. - * - * @param {String ...} custom message - * @api public - */ - Assertion.prototype.fail = function (msg) { - var error = function() { return msg || "explicit failure"; } - this.assert(false, error, error); - return this; - }; - - /** - * Function bind implementation. - */ - - function bind (fn, scope) { - return function () { - return fn.apply(scope, arguments); - } - } - - /** - * Array every compatibility - * - * @see bit.ly/5Fq1N2 - * @api public - */ - - function every (arr, fn, thisObj) { - var scope = thisObj || global; - for (var i = 0, j = arr.length; i < j; ++i) { - if (!fn.call(scope, arr[i], i, arr)) { - return false; - } - } - return true; - } - - /** - * Array indexOf compatibility. - * - * @see bit.ly/a5Dxa2 - * @api public - */ - - function indexOf (arr, o, i) { - if (Array.prototype.indexOf) { - return Array.prototype.indexOf.call(arr, o, i); - } - - if (arr.length === undefined) { - return -1; - } - - for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0 - ; i < j && arr[i] !== o; i++); - - return j <= i ? -1 : i; - } - - // https://gist.github.com/1044128/ - var getOuterHTML = function(element) { - if ('outerHTML' in element) return element.outerHTML; - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - var xmlSerializer = new XMLSerializer(); - var html; - if (document.xmlVersion) { - return xmlSerializer.serializeToString(element); - } else { - container.appendChild(element.cloneNode(false)); - html = container.innerHTML.replace('><', '>' + element.innerHTML + '<'); - container.innerHTML = ''; - return html; - } - }; - - // Returns true if object is a DOM element. - var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } - }; - - /** - * Inspects an object. - * - * @see taken from node.js `util` module (copyright Joyent, MIT license) - * @api private - */ - - function i (obj, showHidden, depth) { - var seen = []; - - function stylize (str) { - return str; - } - - function format (value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value !== exports && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - return value.inspect(recurseTimes); - } - - // Primitive types cannot have properties - switch (typeof value) { - case 'undefined': - return stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + json.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return stylize(simple, 'string'); - - case 'number': - return stylize('' + value, 'number'); - - case 'boolean': - return stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return stylize('null', 'null'); - } - - if (isDOMElement(value)) { - return getOuterHTML(value); - } - - // Look up the keys of the object. - var visible_keys = keys(value); - var $keys = showHidden ? Object.getOwnPropertyNames(value) : visible_keys; - - // Functions without properties can be shortcutted. - if (typeof value === 'function' && $keys.length === 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - var name = value.name ? ': ' + value.name : ''; - return stylize('[Function' + name + ']', 'special'); - } - } - - // Dates without properties can be shortcutted - if (isDate(value) && $keys.length === 0) { - return stylize(value.toUTCString(), 'date'); - } - - // Error objects can be shortcutted - if (value instanceof Error) { - return stylize("["+value.toString()+"]", 'Error'); - } - - var base, type, braces; - // Determine the object type - if (isArray(value)) { - type = 'Array'; - braces = ['[', ']']; - } else { - type = 'Object'; - braces = ['{', '}']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var n = value.name ? ': ' + value.name : ''; - base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']'; - } else { - base = ''; - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + value.toUTCString(); - } - - if ($keys.length === 0) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - return stylize('[Object]', 'special'); - } - } - - seen.push(value); - - var output = map($keys, function (key) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = stylize('[Getter/Setter]', 'special'); - } else { - str = stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = stylize('[Setter]', 'special'); - } - } - } - if (indexOf(visible_keys, key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (indexOf(seen, value[key]) < 0) { - if (recurseTimes === null) { - str = format(value[key]); - } else { - str = format(value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (isArray(value)) { - str = map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (type === 'Array' && key.match(/^\d+$/)) { - return str; - } - name = json.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = stylize(name, 'string'); - } - } - - return name + ': ' + str; - }); - - seen.pop(); - - var numLinesEst = 0; - var length = reduce(output, function (prev, cur) { - numLinesEst++; - if (indexOf(cur, '\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 50) { - output = braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - - } else { - output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; - } - - return output; - } - return format(obj, (typeof depth === 'undefined' ? 2 : depth)); - } - - expect.stringify = i; - - function isArray (ar) { - return Object.prototype.toString.call(ar) === '[object Array]'; - } - - function isRegExp(re) { - var s; - try { - s = '' + re; - } catch (e) { - return false; - } - - return re instanceof RegExp || // easy case - // duck-type for context-switching evalcx case - typeof(re) === 'function' && - re.constructor.name === 'RegExp' && - re.compile && - re.test && - re.exec && - s.match(/^\/.*\/[gim]{0,3}$/); - } - - function isDate(d) { - return d instanceof Date; - } - - function keys (obj) { - if (Object.keys) { - return Object.keys(obj); - } - - var keys = []; - - for (var i in obj) { - if (Object.prototype.hasOwnProperty.call(obj, i)) { - keys.push(i); - } - } - - return keys; - } - - function map (arr, mapper, that) { - if (Array.prototype.map) { - return Array.prototype.map.call(arr, mapper, that); - } - - var other= new Array(arr.length); - - for (var i= 0, n = arr.length; i= 2) { - var rv = arguments[1]; - } else { - do { - if (i in this) { - rv = this[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new TypeError(); - } while (true); - } - - for (; i < len; i++) { - if (i in this) - rv = fun.call(null, rv, this[i], i, this); - } - - return rv; - } - - /** - * Asserts deep equality - * - * @see taken from node.js `assert` module (copyright Joyent, MIT license) - * @api private - */ - - expect.eql = function eql(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - } else if ('undefined' != typeof Buffer - && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == "object", - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return actual == expected; - // If both are regular expression use the special `regExpEquiv` method - // to determine equivalence. - } else if (isRegExp(actual) && isRegExp(expected)) { - return regExpEquiv(actual, expected); - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical "prototype" property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } - }; - - function isUndefinedOrNull (value) { - return value === null || value === undefined; - } - - function isArguments (object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; - } - - function regExpEquiv (a, b) { - return a.source === b.source && a.global === b.global && - a.ignoreCase === b.ignoreCase && a.multiline === b.multiline; - } - - function objEquiv (a, b) { - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical "prototype" property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return expect.eql(a, b); - } - try{ - var ka = keys(a), - kb = keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!expect.eql(a[key], b[key])) - return false; - } - return true; - } - - var json = (function () { - "use strict"; - - if ('object' == typeof JSON && JSON.parse && JSON.stringify) { - return { - parse: nativeJSON.parse - , stringify: nativeJSON.stringify - } - } - - var JSON = {}; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - function date(d, key) { - return isFinite(d.valueOf()) ? - d.getUTCFullYear() + '-' + - f(d.getUTCMonth() + 1) + '-' + - f(d.getUTCDate()) + 'T' + - f(d.getUTCHours()) + ':' + - f(d.getUTCMinutes()) + ':' + - f(d.getUTCSeconds()) + 'Z' : null; - } - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - - function quote(string) { - - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - - - function str(key, holder) { - - // Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - // If the value has a toJSON method, call it to obtain a replacement value. - - if (value instanceof Date) { - value = date(key); - } - - // If we were called with a replacer function, then call the replacer to - // obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - - // What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - - // JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - - // If the value is a boolean or null, convert it to a string. Note: - // typeof null does not produce 'null'. The case is included here in - // the remote chance that this gets fixed someday. - - return String(value); - - // If the type is 'object', we might be dealing with an object or an array or - // null. - - case 'object': - - // Due to a specification blunder in ECMAScript, typeof null is 'object', - // so watch out for that case. - - if (!value) { - return 'null'; - } - - // Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - - // Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - - // The value is an array. Stringify every element. Use null as a placeholder - // for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - // Join all of the elements together, separated with commas, and wrap them in - // brackets. - - v = partial.length === 0 ? '[]' : gap ? - '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - - // If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - - // Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - // Join all of the member texts together, separated with commas, - // and wrap them in braces. - - v = partial.length === 0 ? '{}' : gap ? - '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : - '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - // If the JSON object does not yet have a stringify method, give it one. - - JSON.stringify = function (value, replacer, space) { - - // The stringify method takes a value and an optional replacer, and an optional - // space parameter, and returns a JSON text. The replacer can be a function - // that can replace values, or an array of strings that will select the keys. - // A default replacer method can be provided. Use of the space parameter can - // produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - - // If the space parameter is a number, make an indent string containing that - // many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - - // If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - - // If there is a replacer, it must be a function or an array. - // Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - - // Make a fake root object containing our value under the key of ''. - // Return the result of stringifying the value. - - return str('', {'': value}); - }; - - // If the JSON object does not yet have a parse method, give it one. - - JSON.parse = function (text, reviver) { - // The parse method takes a text and an optional reviver function, and returns - // a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - - // The walk method is used to recursively walk the resulting structure so - // that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - - // Parsing happens in four stages. In the first stage, we replace certain - // Unicode characters with escape sequences. JavaScript handles many characters - // incorrectly, either silently deleting them, or treating them as line endings. - - text = String(text); - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - - // In the second stage, we run the text against regular expressions that look - // for non-JSON patterns. We are especially concerned with '()' and 'new' - // because they can cause invocation, and '=' because it can cause mutation. - // But just to be safe, we want to reject all unexpected forms. - - // We split the second stage into 4 regexp operations in order to work around - // crippling inefficiencies in IE's and Safari's regexp engines. First we - // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we - // replace all simple value tokens with ']' characters. Third, we delete all - // open brackets that follow a colon or comma or that begin the text. Finally, - // we look to see that the remaining characters are only whitespace or ']' or - // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/ - .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') - .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') - .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - - // In the third stage we use the eval function to compile the text into a - // JavaScript structure. The '{' operator is subject to a syntactic ambiguity - // in JavaScript: it can begin a block or an object literal. We wrap the text - // in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - - // In the optional fourth stage, we recursively walk the new structure, passing - // each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' ? - walk({'': j}, '') : j; - } - - // If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - - return JSON; - })(); - - if ('undefined' != typeof window) { - window.expect = module.exports; - } - -})( - this - , 'undefined' != typeof module ? module : {exports: {}} -); diff --git a/node_modules/doublearray/test/libs/jquery.js b/node_modules/doublearray/test/libs/jquery.js deleted file mode 100644 index cbe6abe..0000000 --- a/node_modules/doublearray/test/libs/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length; -while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("